From fd4ce124095c1f5d0417f739c3daa99839be1657 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sun, 31 Mar 2024 18:33:35 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Helpers/HelperFunctions.php | 2 +- app/Http/Controllers/ChampionController.php | 6 +++--- app/Http/Controllers/ChampionSkinController.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Helpers/HelperFunctions.php b/app/Helpers/HelperFunctions.php index f641280..7647af7 100644 --- a/app/Helpers/HelperFunctions.php +++ b/app/Helpers/HelperFunctions.php @@ -13,7 +13,7 @@ function getRoleIcon($roleName): string 'Support' => 'gm-support.png', ]; - return asset('img/' . $roleIcons[$roleName]); + return asset('img/'.$roleIcons[$roleName]); } function getAverageColorFromImageUrl($imageUrl): string diff --git a/app/Http/Controllers/ChampionController.php b/app/Http/Controllers/ChampionController.php index e7f3737..c8c47fa 100644 --- a/app/Http/Controllers/ChampionController.php +++ b/app/Http/Controllers/ChampionController.php @@ -30,14 +30,14 @@ 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('streamers', 'skins', 'lanes')); + $champion = Cache::remember('championShowCache'.$champion->slug, $threeDaysInSeconds, static fn () => $champion->load('streamers', 'skins', 'lanes')); $streamers = $champion->load('streamers')->streamers; $splashColor = Cache::remember( - 'championSplashColorCache' . $champion->slug, + 'championSplashColorCache'.$champion->slug, $sixMonthsInSeconds, - static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url=' . $champion->getChampionImageAttribute()) + static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url='.$champion->getChampionImageAttribute()) ); $champion->splash_color = $splashColor; diff --git a/app/Http/Controllers/ChampionSkinController.php b/app/Http/Controllers/ChampionSkinController.php index dff12c8..c456fce 100644 --- a/app/Http/Controllers/ChampionSkinController.php +++ b/app/Http/Controllers/ChampionSkinController.php @@ -55,15 +55,15 @@ class ChampionSkinController extends Controller public function show(ChampionSkin $championSkin) { $skin = Cache::remember( - 'championSkinShowCache' . $championSkin->slug, + 'championSkinShowCache'.$championSkin->slug, 60 * 60 * 48, static fn () => $championSkin->load('champion', 'chromas') ); $splashColor = Cache::remember( - 'championSkinSplashColorCache' . $championSkin->slug, + 'championSkinSplashColorCache'.$championSkin->slug, 60 * 60 * 120, - static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url=' . $championSkin->getSkinImageAttribute()) + static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url='.$championSkin->getSkinImageAttribute()) ); $skin->splash_color = $splashColor;