diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index e8cd811..d234b75 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,3 +6,4 @@ a1713c2f67dc8fcb83b8a54013b74859ff93f076 73d520fe1fba26c16cfe3d636d4ab75e7a12c2d2 3c6278cc6eb48662e01a082f3e721c20cd4ecdde 016a0c75837e666dcc6d04ccbf109ab47618f3dc +7088b1630c774c98c990f2585dbdc4a24371060c diff --git a/app/Console/Commands/CloudflarePurgeCommand.php b/app/Console/Commands/CloudflarePurgeCommand.php index 4f5646d..efbb919 100644 --- a/app/Console/Commands/CloudflarePurgeCommand.php +++ b/app/Console/Commands/CloudflarePurgeCommand.php @@ -19,7 +19,7 @@ class CloudflarePurgeCommand extends Command public function handle(): void { if (App::environment('production')) { - $client = new Client(); + $client = new Client; $cf_zone_id = config('cloudflare.cf_zone_id'); $cf_auth_bearer = config('cloudflare.cf_auth_bearer'); diff --git a/app/Helpers/HelperFunctions.php b/app/Helpers/HelperFunctions.php index 4a2ed92..1a02536 100644 --- a/app/Helpers/HelperFunctions.php +++ b/app/Helpers/HelperFunctions.php @@ -20,7 +20,7 @@ function getRoleIcon($roleName): string function getAverageColorFromImageUrl($imageUrl): string { - $imgManager = new ImageManager(new Driver()); + $imgManager = new ImageManager(new Driver); try { $img = $imgManager->read(file_get_contents($imageUrl)); diff --git a/composer.lock b/composer.lock index 391ba31..accd244 100644 --- a/composer.lock +++ b/composer.lock @@ -9733,16 +9733,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.2", + "version": "1.12.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1" + "reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0ca1c7bb55fca8fe6448f16fff0f311ccec960a1", - "reference": "0ca1c7bb55fca8fe6448f16fff0f311ccec960a1", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc4d2f145a88ea7141ae698effd64d9df46527ae", + "reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae", "shasum": "" }, "require": { @@ -9787,7 +9787,7 @@ "type": "github" } ], - "time": "2024-09-05T16:09:28+00:00" + "time": "2024-10-06T15:03:59+00:00" }, { "name": "phpunit/php-code-coverage", @@ -10214,21 +10214,21 @@ }, { "name": "rector/rector", - "version": "1.2.5", + "version": "1.2.6", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "e98aa793ca3fcd17e893cfaf9103ac049775d339" + "reference": "6ca85da28159dbd3bb36211c5104b7bc91278e99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/e98aa793ca3fcd17e893cfaf9103ac049775d339", - "reference": "e98aa793ca3fcd17e893cfaf9103ac049775d339", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/6ca85da28159dbd3bb36211c5104b7bc91278e99", + "reference": "6ca85da28159dbd3bb36211c5104b7bc91278e99", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.12.2" + "phpstan/phpstan": "^1.12.5" }, "conflict": { "rector/rector-doctrine": "*", @@ -10261,7 +10261,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/1.2.5" + "source": "https://github.com/rectorphp/rector/tree/1.2.6" }, "funding": [ { @@ -10269,7 +10269,7 @@ "type": "github" } ], - "time": "2024-09-08T17:43:24+00:00" + "time": "2024-10-03T08:56:44+00:00" }, { "name": "sebastian/cli-parser", diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 6fa9684..750bc49 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php index 8647a42..3fa9275 100644 --- a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php +++ b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index 95eb857..85264d8 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index 3333f7e..b30c323 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_06_07_000001_create_pulse_tables.php b/database/migrations/2023_06_07_000001_create_pulse_tables.php index c28e97f..29fc6bf 100644 --- a/database/migrations/2023_06_07_000001_create_pulse_tables.php +++ b/database/migrations/2023_06_07_000001_create_pulse_tables.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema; use Laravel\Pulse\Support\PulseMigration; -return new class() extends PulseMigration +return new class extends PulseMigration { public function up(): void { diff --git a/database/migrations/2023_10_25_180120_create_champions_table.php b/database/migrations/2023_10_25_180120_create_champions_table.php index e7eb305..7d69a41 100644 --- a/database/migrations/2023_10_25_180120_create_champions_table.php +++ b/database/migrations/2023_10_25_180120_create_champions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_10_26_175822_create_champion_skins_table.php b/database/migrations/2023_10_26_175822_create_champion_skins_table.php index 27739e3..29822a7 100644 --- a/database/migrations/2023_10_26_175822_create_champion_skins_table.php +++ b/database/migrations/2023_10_26_175822_create_champion_skins_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_10_27_080159_create_skin_chromas_table.php b/database/migrations/2023_10_27_080159_create_skin_chromas_table.php index c6210e5..cf224fc 100644 --- a/database/migrations/2023_10_27_080159_create_skin_chromas_table.php +++ b/database/migrations/2023_10_27_080159_create_skin_chromas_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_10_31_081816_fix_typo_championskins.php b/database/migrations/2023_10_31_081816_fix_typo_championskins.php index 1ffdcd8..4f4e541 100644 --- a/database/migrations/2023_10_31_081816_fix_typo_championskins.php +++ b/database/migrations/2023_10_31_081816_fix_typo_championskins.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_10_31_084006_skin_price_type_fix.php b/database/migrations/2023_10_31_084006_skin_price_type_fix.php index 24a00d5..f8ea454 100644 --- a/database/migrations/2023_10_31_084006_skin_price_type_fix.php +++ b/database/migrations/2023_10_31_084006_skin_price_type_fix.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_10_31_085408_make_lore_nullable.php b/database/migrations/2023_10_31_085408_make_lore_nullable.php index 7de5a2b..1fd1aae 100644 --- a/database/migrations/2023_10_31_085408_make_lore_nullable.php +++ b/database/migrations/2023_10_31_085408_make_lore_nullable.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php b/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php index 44f8fa2..40e37d2 100644 --- a/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php +++ b/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_11_01_134531_create_champion_roles_table.php b/database/migrations/2023_11_01_134531_create_champion_roles_table.php index 83d58fe..cf805e2 100644 --- a/database/migrations/2023_11_01_134531_create_champion_roles_table.php +++ b/database/migrations/2023_11_01_134531_create_champion_roles_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_11_01_135724_add_slug_to_champions.php b/database/migrations/2023_11_01_135724_add_slug_to_champions.php index 56aaea8..ce13853 100644 --- a/database/migrations/2023_11_01_135724_add_slug_to_champions.php +++ b/database/migrations/2023_11_01_135724_add_slug_to_champions.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php b/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php index ad8edad..1f3b481 100644 --- a/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php +++ b/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php b/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php index 2fb7bbc..ebe89c6 100644 --- a/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php +++ b/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_11_15_105425_create_summoner_icons_table.php b/database/migrations/2023_11_15_105425_create_summoner_icons_table.php index 44beae4..f206f35 100644 --- a/database/migrations/2023_11_15_105425_create_summoner_icons_table.php +++ b/database/migrations/2023_11_15_105425_create_summoner_icons_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_11_26_175055_create_summoner_emotes_table.php b/database/migrations/2023_11_26_175055_create_summoner_emotes_table.php index 85e40e2..95eacb6 100644 --- a/database/migrations/2023_11_26_175055_create_summoner_emotes_table.php +++ b/database/migrations/2023_11_26_175055_create_summoner_emotes_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2023_12_01_211507_add_admin_to_users.php b/database/migrations/2023_12_01_211507_add_admin_to_users.php index 3b57e1e..08458a0 100644 --- a/database/migrations/2023_12_01_211507_add_admin_to_users.php +++ b/database/migrations/2023_12_01_211507_add_admin_to_users.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2024_02_24_162055_create_contact_submissions_table.php b/database/migrations/2024_02_24_162055_create_contact_submissions_table.php index e0c57ac..460ef13 100644 --- a/database/migrations/2024_02_24_162055_create_contact_submissions_table.php +++ b/database/migrations/2024_02_24_162055_create_contact_submissions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/database/migrations/2024_03_18_170123_create_sessions_table.php b/database/migrations/2024_03_18_170123_create_sessions_table.php index 744f195..7a84e3d 100644 --- a/database/migrations/2024_03_18_170123_create_sessions_table.php +++ b/database/migrations/2024_03_18_170123_create_sessions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class() extends Migration +return new class extends Migration { public function up(): void { diff --git a/routes/web.php b/routes/web.php index a6108fb..53cd3f7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -34,64 +34,64 @@ | */ -Route::get('/', static fn () => (new HomeController())->index())->name('home'); +Route::get('/', static fn () => (new HomeController)->index())->name('home'); -Route::get('donate', static fn () => (new HomeController())->donate())->name('donate'); +Route::get('donate', static fn () => (new HomeController)->donate())->name('donate'); -Route::get('roadmap', static fn () => (new HomeController())->roadmap())->name('roadmap'); +Route::get('roadmap', static fn () => (new HomeController)->roadmap())->name('roadmap'); // Champions -Route::get('champions', static fn () => (new ChampionController())->index())->name('champions.index'); -Route::get('champion/{champion}', static fn (Champion $champion) => (new ChampionController())->show($champion))->name('champions.show'); +Route::get('champions', static fn () => (new ChampionController)->index())->name('champions.index'); +Route::get('champion/{champion}', static fn (Champion $champion) => (new ChampionController)->show($champion))->name('champions.show'); // Skins -Route::get('skins', static fn (Request $request) => (new ChampionSkinController())->index($request))->name('skins.index'); -Route::get('skin/{championSkin}', static fn (ChampionSkin $championSkin) => (new ChampionSkinController())->show($championSkin))->name('skins.show'); +Route::get('skins', static fn (Request $request) => (new ChampionSkinController)->index($request))->name('skins.index'); +Route::get('skin/{championSkin}', static fn (ChampionSkin $championSkin) => (new ChampionSkinController)->show($championSkin))->name('skins.show'); // Icons -Route::get('icons', static fn () => (new SummonerIconController())->index())->name('assets.icons.index'); -Route::get('icon/{summonerIcon}', static fn (SummonerIcon $summonerIcon) => (new SummonerIconController())->show($summonerIcon))->name('assets.icons.show'); +Route::get('icons', static fn () => (new SummonerIconController)->index())->name('assets.icons.index'); +Route::get('icon/{summonerIcon}', static fn (SummonerIcon $summonerIcon) => (new SummonerIconController)->show($summonerIcon))->name('assets.icons.show'); // Emotes -Route::get('emotes', static fn () => (new SummonerEmoteController())->index())->name('assets.emotes.index'); +Route::get('emotes', static fn () => (new SummonerEmoteController)->index())->name('assets.emotes.index'); // Assets -Route::get('assets', static fn () => (new AssetsController())->index())->name('assets.index'); +Route::get('assets', static fn () => (new AssetsController)->index())->name('assets.index'); // Sales -Route::get('sale-rotation', static fn () => (new SaleController())->index())->name('sales.index'); +Route::get('sale-rotation', static fn () => (new SaleController)->index())->name('sales.index'); // About -Route::get('about', static fn () => (new AboutController())->index())->name('about.index'); +Route::get('about', static fn () => (new AboutController)->index())->name('about.index'); // About.FAQController -Route::get('about/faq/league-of-legends', static fn () => (new FAQController())->leagueoflegends())->name('about.faq.leagueoflegends'); +Route::get('about/faq/league-of-legends', static fn () => (new FAQController)->leagueoflegends())->name('about.faq.leagueoflegends'); -Route::get('about/faq/heimerdinger', static fn () => (new FAQController())->heimerdinger())->name('about.faq.heimerdinger'); +Route::get('about/faq/heimerdinger', static fn () => (new FAQController)->heimerdinger())->name('about.faq.heimerdinger'); // Posts -Route::get('posts', static fn () => (new PostsController())->index())->name('posts.index'); +Route::get('posts', static fn () => (new PostsController)->index())->name('posts.index'); -Route::get('post/{post}', static fn (Sheet $post) => (new PostsController())->show($post))->name('posts.show'); +Route::get('post/{post}', static fn (Sheet $post) => (new PostsController)->show($post))->name('posts.show'); // Contact -Route::get('contact', static fn () => (new ContactSubmissionController())->index())->name('contact.index'); +Route::get('contact', static fn () => (new ContactSubmissionController)->index())->name('contact.index'); Route::post('contact', function (ContactSubmissionRequest $request) { - return (new ContactSubmissionController())->store($request); + return (new ContactSubmissionController)->store($request); })->name('contact.store')->middleware(ProtectAgainstSpam::class); // Site Map -Route::get('resource/sitemap', static fn () => (new HTMLSitemapController())->index())->name('sitemap.index'); +Route::get('resource/sitemap', static fn () => (new HTMLSitemapController)->index())->name('sitemap.index'); // Pulse Route::get(config('app.login_route'), static fn () => redirect('/pulse'))->name('login')->middleware('auth.basic'); // Streamer Panel -Route::get('streamerpanel', static fn () => (new StreamerPanelController())->index())->name('streamerpanel.index')->middleware('auth.basic'); -Route::get('streamerpanel/add', static fn () => (new StreamerPanelController())->create())->name('streamerpanel.streamers.create')->middleware('auth.basic'); -Route::post('streamerpanel/add', static fn (Request $request) => (new StreamerPanelController())->store($request))->name('streamerpanel.store')->middleware('auth.basic'); -Route::get('streamerpanel/edit/{streamer}', static fn (Streamer $streamer) => (new StreamerPanelController())->edit($streamer))->name('streamerpanel.edit')->middleware('auth.basic'); -Route::post('streamerpanel/edit/{streamer}', static fn (Request $request, Streamer $streamer) => (new StreamerPanelController())->update($request, $streamer))->name('streamerpanel.update')->middleware('auth.basic'); -Route::delete('streamerpanel/delete/{streamer}', static fn (Streamer $streamer) => (new StreamerPanelController())->destroy($streamer))->name('streamerpanel.destroy')->middleware('auth.basic'); +Route::get('streamerpanel', static fn () => (new StreamerPanelController)->index())->name('streamerpanel.index')->middleware('auth.basic'); +Route::get('streamerpanel/add', static fn () => (new StreamerPanelController)->create())->name('streamerpanel.streamers.create')->middleware('auth.basic'); +Route::post('streamerpanel/add', static fn (Request $request) => (new StreamerPanelController)->store($request))->name('streamerpanel.store')->middleware('auth.basic'); +Route::get('streamerpanel/edit/{streamer}', static fn (Streamer $streamer) => (new StreamerPanelController)->edit($streamer))->name('streamerpanel.edit')->middleware('auth.basic'); +Route::post('streamerpanel/edit/{streamer}', static fn (Request $request, Streamer $streamer) => (new StreamerPanelController)->update($request, $streamer))->name('streamerpanel.update')->middleware('auth.basic'); +Route::delete('streamerpanel/delete/{streamer}', static fn (Streamer $streamer) => (new StreamerPanelController)->destroy($streamer))->name('streamerpanel.destroy')->middleware('auth.basic'); // Redirects for old URLs Route::redirect('support-me', 'donate', 301);