mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
Apply fixes from StyleCI
This commit is contained in:
@@ -39,21 +39,21 @@ class Champion extends Model
|
||||
public function getResourceTypeAttribute($value): string
|
||||
{
|
||||
$resourceTypes = [
|
||||
'BLOOD_WELL' => "Blood",
|
||||
"MANA" => "Mana",
|
||||
"ENERGY" => "Energy",
|
||||
"NONE" => "None",
|
||||
"HEALTH" => "Health",
|
||||
"RAGE" => "Rage",
|
||||
"COURAGE" => "Courage",
|
||||
"SHIELD" => "Shield",
|
||||
"FURY" => "Fury",
|
||||
"FEROCITY" => "Ferocity",
|
||||
"HEAT" => "Heat",
|
||||
"GRIT" => "Grit",
|
||||
"BLOODTHIRST" => "Bloodthirst",
|
||||
"FLOW" => "Flow",
|
||||
"SOUL_UNBOUND" => "Soul Unbound",
|
||||
'BLOOD_WELL' => 'Blood',
|
||||
'MANA' => 'Mana',
|
||||
'ENERGY' => 'Energy',
|
||||
'NONE' => 'None',
|
||||
'HEALTH' => 'Health',
|
||||
'RAGE' => 'Rage',
|
||||
'COURAGE' => 'Courage',
|
||||
'SHIELD' => 'Shield',
|
||||
'FURY' => 'Fury',
|
||||
'FEROCITY' => 'Ferocity',
|
||||
'HEAT' => 'Heat',
|
||||
'GRIT' => 'Grit',
|
||||
'BLOODTHIRST' => 'Bloodthirst',
|
||||
'FLOW' => 'Flow',
|
||||
'SOUL_UNBOUND' => 'Soul Unbound',
|
||||
];
|
||||
|
||||
return $resourceTypes[$value];
|
||||
@@ -96,49 +96,48 @@ class Champion extends Model
|
||||
|
||||
public function getChampionImageAttribute($centered = true): string
|
||||
{
|
||||
$url = 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/splash-art';
|
||||
$url = 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/splash-art';
|
||||
|
||||
return $centered ? $url . '/centered' : $url;
|
||||
return $centered ? $url.'/centered' : $url;
|
||||
}
|
||||
|
||||
|
||||
public function getChampionImageLoadingAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/portrait';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/portrait';
|
||||
}
|
||||
|
||||
public function getChampionImageTileAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/tile';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/tile';
|
||||
}
|
||||
|
||||
public function getChampionSquareImageAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/square';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/square';
|
||||
}
|
||||
|
||||
public function getChampionAbilityIconQAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/ability-icon/q';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/q';
|
||||
}
|
||||
|
||||
public function getChampionAbilityIconWAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/ability-icon/w';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/w';
|
||||
}
|
||||
|
||||
public function getChampionAbilityIconEAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/ability-icon/e';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/e';
|
||||
}
|
||||
|
||||
public function getChampionAbilityIconRAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/ability-icon/r';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/r';
|
||||
}
|
||||
|
||||
public function getChampionAbilityIconPAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/ability-icon/p';
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/p';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,16 +74,16 @@ class ChampionSkin extends Model
|
||||
|
||||
public function getSkinImageAttribute(): string
|
||||
{
|
||||
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-splashes/' . $this->champion_id . '/' . $this->full_skin_id . '.jpg';
|
||||
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-splashes/'.$this->champion_id.'/'.$this->full_skin_id.'.jpg';
|
||||
}
|
||||
|
||||
public function getSkinImageLoadingAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/portrait/skin/' . $this->skin_id;
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/portrait/skin/'.$this->skin_id;
|
||||
}
|
||||
|
||||
public function getSkinImageTileAttribute(): string
|
||||
{
|
||||
return 'https://cdn.communitydragon.org/latest/champion/' . $this->champion_id . '/tile/skin/' . $this->skin_id;
|
||||
return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/tile/skin/'.$this->skin_id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Enums\ContactCategory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ContactSubmission extends Model
|
||||
{
|
||||
|
||||
@@ -43,6 +43,6 @@ class SkinChroma extends Model
|
||||
|
||||
public function getChromaImageAttribute()
|
||||
{
|
||||
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-chroma-images/' . $this->skin->champion_id . '/' . $this->chroma_id . '.png';
|
||||
return 'https://raw.communitydragon.org/pbe/plugins/rcp-be-lol-game-data/global/default/v1/champion-chroma-images/'.$this->skin->champion_id.'/'.$this->chroma_id.'.png';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class SummonerIcon extends Model
|
||||
public function getSqidAttribute(): string
|
||||
{
|
||||
$sqids = new Sqids(minLength: 5);
|
||||
|
||||
return $sqids->encode([$this->icon_id]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user