style: make per the coding style in pint

This commit is contained in:
Rico van Zelst
2023-11-02 13:05:53 +01:00
parent a8c31e3097
commit 91ec747c2c
37 changed files with 55 additions and 69 deletions

View File

@@ -2,7 +2,6 @@
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class ChampionRolesSeeder extends Seeder

View File

@@ -39,10 +39,10 @@ class ChampionSeeder extends Seeder
// Check if the champion already exists and if any attributes have changed, if so update the champion. If the champion doesn't exist, create it.
// This is to prevent the champion data from being updated every time the seeder is run. As I'll probably run this on a cron job.
if ($championExists && $this->hasAttributesChanged($championExists, $championAttributes)) {
Log::info('Champion '.$champion['name'].' has changed, updating...');
Log::info('Champion ' . $champion['name'] . ' has changed, updating...');
$championExists->update($championAttributes);
} elseif (! $championExists) {
Log::info('New champion detected! Creating '.$champion['name'].'...');
Log::info('New champion detected! Creating ' . $champion['name'] . '...');
Champion::create($championAttributes);
}
}

View File

@@ -34,7 +34,7 @@ class ChampionSkinSeeder extends Seeder
'champion_id' => $champion['id'],
'full_skin_id' => $skin['id'],
'skin_id' => substr($skin['id'], 3),
'skin_name' => $skin['name'].' '.$champion['name'],
'skin_name' => $skin['name'] . ' ' . $champion['name'],
'lore' => $skin['lore'],
'availability' => $skin['availability'],
'loot_eligible' => $skin['lootEligible'],
@@ -59,10 +59,10 @@ class ChampionSkinSeeder extends Seeder
// Check if the skin already exists and if any attributes have changed, if so update the skin. If the skin doesn't exist, create it.
// This is to prevent the skin data from being updated every time the seeder is run. As I'll probably run this on a cron job.
if ($skinExists && $this->hasAttributesChanged($skinExists, $skinAttributes)) {
Log::info('Skin '.$skin['name'].' '.$champion['name'].' has changed, updating...');
Log::info('Skin ' . $skin['name'] . ' ' . $champion['name'] . ' has changed, updating...');
$skinExists->update($skinAttributes);
} elseif (! $skinExists) {
Log::info('New skin detected! Creating '.$skin['name'].' '.$champion['name'].'...');
Log::info('New skin detected! Creating ' . $skin['name'] . ' ' . $champion['name'] . '...');
ChampionSkin::create($skinAttributes);
}
}

View File

@@ -17,6 +17,6 @@ class DatabaseSeeder extends Seeder
$this->call(ChampionSkinSeeder::class);
$this->call(SkinChromaSeeder::class);
Log::info('Seeding complete at '.date('Y-m-d H:i:s'));
Log::info('Seeding complete at ' . date('Y-m-d H:i:s'));
}
}

View File

@@ -32,7 +32,7 @@ class SkinChromaSeeder extends Seeder
$chromaAttributes = [
'chroma_id' => $chromaId,
'full_skin_id' => $skin['id'],
'skin_name' => $skin['name'].' '.$champion['name'],
'skin_name' => $skin['name'] . ' ' . $champion['name'],
'chroma_name' => $chroma['name'],
'chroma_colors' => $chroma['colors'],
'chroma_image' => $chroma['chromaPath'],
@@ -44,10 +44,10 @@ class SkinChromaSeeder extends Seeder
}
if ($chromaExists && $this->hasAttributesChanged($chromaExists, $chromaAttributes)) {
Log::info('Updating chroma: '.$chromaId);
Log::info('Updating chroma: ' . $chromaId);
$chromaExists->update($chromaAttributes);
} elseif (! $chromaExists) {
Log::info('Creating chroma: '.$chromaId);
Log::info('Creating chroma: ' . $chromaId);
SkinChroma::create($chromaAttributes);
}
}