mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
Apply fixes from StyleCI
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Models\ChampionImage;
|
||||
use Intervention\Image\Drivers\Gd\Driver;
|
||||
use Intervention\Image\ImageManager;
|
||||
use App\Models\ChampionImage;
|
||||
|
||||
function getRoleIcon($roleName): string
|
||||
{
|
||||
@@ -67,17 +67,17 @@ function getRoleIconSvg($roleName): string
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the champion image
|
||||
* Get the champion image.
|
||||
*
|
||||
* @param string $full_id
|
||||
* @param enum $type splash, uncentered_splash, loading, tile, icon, ability, video
|
||||
* @param string $full_id
|
||||
* @param enum $type splash, uncentered_splash, loading, tile, icon, ability, video
|
||||
* @return string
|
||||
*/
|
||||
function getChampionImage($full_id, $type): string
|
||||
{
|
||||
$championImage = ChampionImage::where('full_id', $full_id)->where('type', $type)->first();
|
||||
|
||||
if (!$championImage) {
|
||||
if (! $championImage) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
@@ -101,12 +101,12 @@ class Champion extends Model
|
||||
|
||||
public function getChampionImageAttribute(bool $uncentered = false): string
|
||||
{
|
||||
return getChampionImage($this->champion_id . '000', $uncentered ? 'uncentered_splash' : 'splash');
|
||||
return getChampionImage($this->champion_id.'000', $uncentered ? 'uncentered_splash' : 'splash');
|
||||
}
|
||||
|
||||
public function getChampionImageTileAttribute(): string
|
||||
{
|
||||
return getChampionImage($this->champion_id . '000', 'tile');
|
||||
return getChampionImage($this->champion_id.'000', 'tile');
|
||||
}
|
||||
|
||||
public function getChampionSquareImageAttribute(): string
|
||||
|
||||
Reference in New Issue
Block a user