fix: Use static arrow function for splash color calculation

- Replace the anonymous function with a static arrow function for calculating the splash color in ChampionSkinController.php.
This commit is contained in:
Rico van Zelst
2024-03-28 10:35:50 +01:00
parent 998f386f20
commit 2b9fd26b7e

View File

@@ -63,7 +63,7 @@ class ChampionSkinController extends Controller
$splashColor = Cache::remember(
'championSkinSplashColorCache' . $championSkin->slug,
60 * 60 * 120,
getAverageColorFromImageUrl('https://wsrv.nl/?url=' . $championSkin->getSkinImageAttribute())
static fn () => getAverageColorFromImageUrl('https://wsrv.nl/?url=' . $championSkin->getSkinImageAttribute())
);
$skin->splash_color = $splashColor;