mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
feat: refactor code and improve readability
This commit is contained in:
@@ -24,7 +24,7 @@ function getAverageColorFromImageUrl($imageUrl): string
|
||||
|
||||
try {
|
||||
$img = $imgManager->read(file_get_contents($imageUrl));
|
||||
} catch (Exception $e) {
|
||||
} catch (Exception) {
|
||||
return '#904f2c';
|
||||
}
|
||||
|
||||
@@ -90,9 +90,7 @@ function getChampionImage($full_id, $type): string
|
||||
function getCommitHash(): string
|
||||
{
|
||||
/** @var string $commit */
|
||||
$commit = Cache::remember('commit_hash', 60 * 72, function () {
|
||||
return trim(exec('git log --pretty="%h" -n1 HEAD'));
|
||||
});
|
||||
$commit = Cache::remember('commit_hash', 60 * 72, fn() => trim(exec('git log --pretty="%h" -n1 HEAD')));
|
||||
|
||||
return $commit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user