diff --git a/app/Helpers/HelperFunctions.php b/app/Helpers/HelperFunctions.php index ae6de89..4a2ed92 100644 --- a/app/Helpers/HelperFunctions.php +++ b/app/Helpers/HelperFunctions.php @@ -72,7 +72,6 @@ function getRoleIconSvg($roleName): string * * @param string $full_id * @param enum $type splash, uncentered_splash, loading, tile, icon, ability, video - * @return string */ function getChampionImage($full_id, $type): string { @@ -85,6 +84,9 @@ function getChampionImage($full_id, $type): string return $championImage->url; } +/** + * Get the commit hash. + */ function getCommitHash(): string { /** @var string $commit */ diff --git a/app/Models/Champion.php b/app/Models/Champion.php index 8695168..98f5f67 100644 --- a/app/Models/Champion.php +++ b/app/Models/Champion.php @@ -29,13 +29,6 @@ class Champion extends Model 'release_patch', ]; - protected function casts(): array - { - return [ - 'roles' => 'array', - ]; - } - public function getResourceTypeAttribute($value): string { $resourceTypes = [ @@ -139,4 +132,11 @@ class Champion extends Model { return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/ability-icon/p'; } + + protected function casts(): array + { + return [ + 'roles' => 'array', + ]; + } } diff --git a/app/Models/ChampionRoles.php b/app/Models/ChampionRoles.php index 33626a0..821aa69 100644 --- a/app/Models/ChampionRoles.php +++ b/app/Models/ChampionRoles.php @@ -16,13 +16,6 @@ class ChampionRoles extends Model 'roles', ]; - protected function casts(): array - { - return [ - 'roles' => 'array', - ]; - } - public function champion(): BelongsTo { return $this->belongsTo(Champion::class, 'champion_id', 'champion_id'); @@ -50,4 +43,11 @@ class ChampionRoles extends Model return $transformedRoles; } + + protected function casts(): array + { + return [ + 'roles' => 'array', + ]; + } } diff --git a/app/Models/ChampionSkin.php b/app/Models/ChampionSkin.php index 2441fe1..522226c 100644 --- a/app/Models/ChampionSkin.php +++ b/app/Models/ChampionSkin.php @@ -34,15 +34,6 @@ class ChampionSkin extends Model 'splash_artist', ]; - protected function casts(): array - { - return [ - 'associated_skinline' => 'array', - 'voice_actor' => 'array', - 'splash_artist' => 'array', - ]; - } - public function sluggable(): array { return [ @@ -86,4 +77,13 @@ class ChampionSkin extends Model { return 'https://cdn.communitydragon.org/latest/champion/'.$this->champion_id.'/tile/skin/'.$this->skin_id; } + + protected function casts(): array + { + return [ + 'associated_skinline' => 'array', + 'voice_actor' => 'array', + 'splash_artist' => 'array', + ]; + } } diff --git a/app/Models/SkinChroma.php b/app/Models/SkinChroma.php index 5c768d5..355779c 100644 --- a/app/Models/SkinChroma.php +++ b/app/Models/SkinChroma.php @@ -20,13 +20,6 @@ class SkinChroma extends Model 'chroma_image', ]; - protected function casts(): array - { - return [ - 'chroma_colors' => 'array', - ]; - } - public function sluggable(): array { return [ @@ -45,4 +38,11 @@ class SkinChroma extends Model { 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'; } + + protected function casts(): array + { + return [ + 'chroma_colors' => 'array', + ]; + } } diff --git a/app/Models/SummonerIcon.php b/app/Models/SummonerIcon.php index 55f70b6..e9c0d47 100644 --- a/app/Models/SummonerIcon.php +++ b/app/Models/SummonerIcon.php @@ -22,13 +22,6 @@ class SummonerIcon extends Model 'esports_event', ]; - protected function casts(): array - { - return [ - 'legacy' => 'boolean', - ]; - } - public function sluggable(): array { return [ @@ -49,4 +42,11 @@ class SummonerIcon extends Model { return 'slug'; } + + protected function casts(): array + { + return [ + 'legacy' => 'boolean', + ]; + } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index ea69488..a0a5bdd 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -8,9 +8,9 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Gate; use Illuminate\Support\Facades\RateLimiter; use Illuminate\Support\Facades\Route; +use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; use Spatie\Sheets\Sheets; -use URL; class AppServiceProvider extends ServiceProvider { diff --git a/composer.json b/composer.json index 2cee0e6..ddd1dc5 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,8 @@ "nunomaduro/collision": "^8.0", "phpunit/phpunit": "^11.0", "rector/rector": "^1.0", - "spatie/laravel-ignition": "^2.4" + "spatie/laravel-ignition": "^2.4", + "tightenco/duster": "^3.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 3fa8d6e..5d41d04 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "01991fbc1fe35d4ff8b7fec2328024e4", + "content-hash": "41231265ce8bfa416b472fc62aa36de4", "packages": [ { "name": "andcarpi/laravel-popper", @@ -11688,6 +11688,76 @@ } ], "time": "2024-03-03T12:36:25+00:00" + }, + { + "name": "tightenco/duster", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/tighten/duster.git", + "reference": "e7c38d576ec555a2765b4a01fb762f09fe7179bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tighten/duster/zipball/e7c38d576ec555a2765b4a01fb762f09fe7179bd", + "reference": "e7c38d576ec555a2765b4a01fb762f09fe7179bd", + "shasum": "" + }, + "require": { + "php": "^8.2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.54", + "laravel-zero/framework": "^11.0", + "laravel/pint": "^1.15", + "nunomaduro/termwind": "^2.0", + "spatie/invade": "^1.1", + "squizlabs/php_codesniffer": "^3.9", + "tightenco/tlint": "^9.3" + }, + "bin": [ + "builds/duster" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Stauffer", + "email": "matt@tighten.com", + "homepage": "https://tighten.com", + "role": "Developer" + }, + { + "name": "Anthony Clark", + "email": "anthony@tighten.com", + "homepage": "https://tighten.com", + "role": "Developer" + } + ], + "description": "Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.", + "homepage": "https://github.com/tighten/duster", + "keywords": [ + "Code style", + "duster", + "laravel", + "php", + "tightenco" + ], + "support": { + "issues": "https://github.com/tighten/duster/issues", + "source": "https://github.com/tighten/duster" + }, + "time": "2024-06-03T18:29:50+00:00" } ], "aliases": [], diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 1f97419..6fa9684 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('users', function (Blueprint $table) { @@ -22,9 +19,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('users'); diff --git a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php index 8b5b388..8647a42 100644 --- a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php +++ b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('password_reset_tokens', function (Blueprint $table) { @@ -18,9 +15,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('password_reset_tokens'); diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index 3eec77b..95eb857 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('failed_jobs', function (Blueprint $table) { @@ -22,9 +19,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('failed_jobs'); diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index 0fc7a63..3333f7e 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('personal_access_tokens', function (Blueprint $table) { @@ -23,9 +20,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('personal_access_tokens'); diff --git a/database/migrations/2023_06_07_000001_create_pulse_tables.php b/database/migrations/2023_06_07_000001_create_pulse_tables.php index 9ea0ebe..c28e97f 100644 --- a/database/migrations/2023_06_07_000001_create_pulse_tables.php +++ b/database/migrations/2023_06_07_000001_create_pulse_tables.php @@ -6,9 +6,6 @@ use Laravel\Pulse\Support\PulseMigration; return new class() extends PulseMigration { - /** - * Run the migrations. - */ public function up(): void { if (! $this->shouldRun()) { @@ -72,9 +69,6 @@ return new class() extends PulseMigration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('pulse_values'); diff --git a/database/migrations/2023_10_25_180120_create_champions_table.php b/database/migrations/2023_10_25_180120_create_champions_table.php index 70670d2..e7eb305 100644 --- a/database/migrations/2023_10_25_180120_create_champions_table.php +++ b/database/migrations/2023_10_25_180120_create_champions_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('champions', function (Blueprint $table) { @@ -32,9 +29,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('champions'); diff --git a/database/migrations/2023_10_26_175822_create_champion_skins_table.php b/database/migrations/2023_10_26_175822_create_champion_skins_table.php index 0f9b308..27739e3 100644 --- a/database/migrations/2023_10_26_175822_create_champion_skins_table.php +++ b/database/migrations/2023_10_26_175822_create_champion_skins_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('champion_skins', function (Blueprint $table) { @@ -39,9 +36,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('champion_skins'); diff --git a/database/migrations/2023_10_27_080159_create_skin_chromas_table.php b/database/migrations/2023_10_27_080159_create_skin_chromas_table.php index baa7b4a..c6210e5 100644 --- a/database/migrations/2023_10_27_080159_create_skin_chromas_table.php +++ b/database/migrations/2023_10_27_080159_create_skin_chromas_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('skin_chromas', function (Blueprint $table) { @@ -25,9 +22,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('skin_chromas'); diff --git a/database/migrations/2023_10_31_081816_fix_typo_championskins.php b/database/migrations/2023_10_31_081816_fix_typo_championskins.php index 11428c4..1ffdcd8 100644 --- a/database/migrations/2023_10_31_081816_fix_typo_championskins.php +++ b/database/migrations/2023_10_31_081816_fix_typo_championskins.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::table('champion_skins', function (Blueprint $table) { @@ -16,9 +13,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('champion_skins', function (Blueprint $table) { diff --git a/database/migrations/2023_10_31_084006_skin_price_type_fix.php b/database/migrations/2023_10_31_084006_skin_price_type_fix.php index 90cd368..24a00d5 100644 --- a/database/migrations/2023_10_31_084006_skin_price_type_fix.php +++ b/database/migrations/2023_10_31_084006_skin_price_type_fix.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::table('champion_skins', function (Blueprint $table) { @@ -16,9 +13,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('champion_skins', function (Blueprint $table) { diff --git a/database/migrations/2023_10_31_085408_make_lore_nullable.php b/database/migrations/2023_10_31_085408_make_lore_nullable.php index 8ab1a8b..7de5a2b 100644 --- a/database/migrations/2023_10_31_085408_make_lore_nullable.php +++ b/database/migrations/2023_10_31_085408_make_lore_nullable.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::table('champion_skins', function (Blueprint $table) { @@ -16,9 +13,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('champion_skins', function (Blueprint $table) { diff --git a/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php b/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php index 06e86ee..44f8fa2 100644 --- a/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php +++ b/database/migrations/2023_11_01_080800_skin_chromas_add_chroma_id.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::table('skin_chromas', function (Blueprint $table) { @@ -16,9 +13,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('skin_chromas', function (Blueprint $table) { diff --git a/database/migrations/2023_11_01_134531_create_champion_roles_table.php b/database/migrations/2023_11_01_134531_create_champion_roles_table.php index 0ebfd3c..83d58fe 100644 --- a/database/migrations/2023_11_01_134531_create_champion_roles_table.php +++ b/database/migrations/2023_11_01_134531_create_champion_roles_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('champion_roles', function (Blueprint $table) { @@ -22,9 +19,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('champion_roles'); diff --git a/database/migrations/2023_11_01_135724_add_slug_to_champions.php b/database/migrations/2023_11_01_135724_add_slug_to_champions.php index 6a76a7c..56aaea8 100644 --- a/database/migrations/2023_11_01_135724_add_slug_to_champions.php +++ b/database/migrations/2023_11_01_135724_add_slug_to_champions.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::table('champions', function (Blueprint $table) { @@ -16,9 +13,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('champions', function (Blueprint $table) { diff --git a/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php b/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php index a36cbc3..ad8edad 100644 --- a/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php +++ b/database/migrations/2023_11_01_140156_add_slug_to_champion_skins.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::table('champion_skins', function (Blueprint $table) { @@ -16,9 +13,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('champion_skins', function (Blueprint $table) { diff --git a/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php b/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php index 7e593aa..2fb7bbc 100644 --- a/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php +++ b/database/migrations/2023_11_01_140243_add_slug_to_skin_chromas.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::table('skin_chromas', function (Blueprint $table) { @@ -16,9 +13,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('skin_chromas', function (Blueprint $table) { diff --git a/database/migrations/2024_03_18_170123_create_sessions_table.php b/database/migrations/2024_03_18_170123_create_sessions_table.php index a2e43a3..744f195 100644 --- a/database/migrations/2024_03_18_170123_create_sessions_table.php +++ b/database/migrations/2024_03_18_170123_create_sessions_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class() extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('sessions', function (Blueprint $table) { @@ -21,9 +18,6 @@ return new class() extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('sessions'); diff --git a/database/migrations/2024_03_20_233357_create_streamers_table.php b/database/migrations/2024_03_20_233357_create_streamers_table.php index c59477a..2589187 100644 --- a/database/migrations/2024_03_20_233357_create_streamers_table.php +++ b/database/migrations/2024_03_20_233357_create_streamers_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('streamers', function (Blueprint $table) { @@ -24,9 +21,6 @@ return new class extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('streamers'); diff --git a/database/migrations/2024_05_01_234838_create_champion_images_table.php b/database/migrations/2024_05_01_234838_create_champion_images_table.php index 59835ca..9ea2214 100644 --- a/database/migrations/2024_05_01_234838_create_champion_images_table.php +++ b/database/migrations/2024_05_01_234838_create_champion_images_table.php @@ -6,9 +6,6 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - /** - * Run the migrations. - */ public function up(): void { Schema::create('champion_images', function (Blueprint $table) { @@ -23,9 +20,6 @@ return new class extends Migration }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::dropIfExists('champion_images'); diff --git a/resources/views/assets/index.blade.php b/resources/views/assets/index.blade.php index b2346b0..b6e1fcb 100644 --- a/resources/views/assets/index.blade.php +++ b/resources/views/assets/index.blade.php @@ -14,7 +14,7 @@
Tired of endless browsing to find that one icon or emote you love?
We got you covered! Search through Automatically updated and sorted by release date.
Click on the asset category you'd like to view below to get started!