Apply fixes from StyleCI

This commit is contained in:
Rico
2024-01-05 23:14:56 +00:00
committed by StyleCI Bot
parent 85e3c4ff2e
commit b2dedb56c9
4 changed files with 9 additions and 9 deletions

View File

@@ -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
$eightHoursInSeconds = 60 * 60 * 8;
$dayInSeconds = 60 * 60 * 24;
$champion = Cache::remember('championShowCache' . $champion->slug, $eightHoursInSeconds, static fn() => $champion->load('skins', 'lanes'));
$champion = Cache::remember('championShowCache' . $champion->slug, $eightHoursInSeconds, static fn () => $champion->load('skins', 'lanes'));
$splashColor = Cache::remember(
'championSplashColorCache' . $champion->slug,
$dayInSeconds,
static fn() => getAverageColorFromImageUrl($champion->getChampionImageAttribute())
static fn () => getAverageColorFromImageUrl($champion->getChampionImageAttribute())
);
$champion->splash_color = $splashColor;