From aae03b398a05e52ae07e40e5433b469ab6692af6 Mon Sep 17 00:00:00 2001 From: Rico Date: Mon, 15 Jan 2024 03:07:06 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Http/Controllers/ChampionController.php | 8 ++++---- app/Http/Controllers/ChampionSkinController.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/ChampionController.php b/app/Http/Controllers/ChampionController.php index 399e034..d6500a2 100644 --- a/app/Http/Controllers/ChampionController.php +++ b/app/Http/Controllers/ChampionController.php @@ -17,9 +17,9 @@ class ChampionController extends Controller { $eightHoursInSeconds = 60 * 60 * 8; - $champions = Cache::remember('championsListAllCache', $eightHoursInSeconds, static fn() => Champion::orderBy('name')->get()); + $champions = Cache::remember('championsListAllCache', $eightHoursInSeconds, static fn () => Champion::orderBy('name')->get()); - $roles = Cache::remember('championsRolesCache', $eightHoursInSeconds, static fn() => ChampionRoles::orderBy('champion_name')->get()); + $roles = Cache::remember('championsRolesCache', $eightHoursInSeconds, static fn () => ChampionRoles::orderBy('champion_name')->get()); return view('champions.index', ['champions' => $champions, 'roles' => $roles]); } @@ -48,12 +48,12 @@ class ChampionController extends Controller $threeDaysInSeconds = 60 * 60 * 24 * 3; $sixMonthsInSeconds = 60 * 60 * 24 * 30 * 6; - $champion = Cache::remember('championShowCache' . $champion->slug, $threeDaysInSeconds, static fn() => $champion->load('skins', 'lanes')); + $champion = Cache::remember('championShowCache' . $champion->slug, $threeDaysInSeconds, static fn () => $champion->load('skins', 'lanes')); $splashColor = Cache::remember( 'championSplashColorCache' . $champion->slug, $sixMonthsInSeconds, - static fn() => getAverageColorFromImageUrl($champion->getChampionImageAttribute()) + static fn () => getAverageColorFromImageUrl($champion->getChampionImageAttribute()) ); $champion->splash_color = $splashColor; diff --git a/app/Http/Controllers/ChampionSkinController.php b/app/Http/Controllers/ChampionSkinController.php index 07996b4..deb07af 100644 --- a/app/Http/Controllers/ChampionSkinController.php +++ b/app/Http/Controllers/ChampionSkinController.php @@ -57,13 +57,13 @@ class ChampionSkinController extends Controller $skin = Cache::remember( 'championSkinShowCache' . $championSkin->slug, 60 * 60 * 48, - static fn() => $championSkin->load('champion', 'chromas') + static fn () => $championSkin->load('champion', 'chromas') ); $splashColor = Cache::remember( 'championSkinSplashColorCache' . $championSkin->slug, 60 * 60 * 120, - static fn() => getAverageColorFromImageUrl($championSkin->getSkinImageAttribute()) + static fn () => getAverageColorFromImageUrl($championSkin->getSkinImageAttribute()) ); $skin->splash_color = $splashColor;