Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot
2024-03-18 17:48:57 +00:00
parent 1bea8f8d5c
commit 8fa00e2ef6
57 changed files with 148 additions and 131 deletions

View File

@@ -48,10 +48,10 @@ class ChampionController extends Controller
$threeDaysInSeconds = 60 * 60 * 24 * 3;
$sixMonthsInSeconds = 60 * 60 * 24 * 30 * 6;
$champion = Cache::remember('championShowCache' . $champion->slug, $threeDaysInSeconds, static fn () => $champion->load('skins', 'lanes'));
$champion = Cache::remember('championShowCache'.$champion->slug, $threeDaysInSeconds, static fn () => $champion->load('skins', 'lanes'));
$splashColor = Cache::remember(
'championSplashColorCache' . $champion->slug,
'championSplashColorCache'.$champion->slug,
$sixMonthsInSeconds,
static fn () => getAverageColorFromImageUrl($champion->getChampionImageAttribute())
);

View File

@@ -55,13 +55,13 @@ class ChampionSkinController extends Controller
public function show(ChampionSkin $championSkin)
{
$skin = Cache::remember(
'championSkinShowCache' . $championSkin->slug,
'championSkinShowCache'.$championSkin->slug,
60 * 60 * 48,
static fn () => $championSkin->load('champion', 'chromas')
);
$splashColor = Cache::remember(
'championSkinSplashColorCache' . $championSkin->slug,
'championSkinSplashColorCache'.$championSkin->slug,
60 * 60 * 120,
static fn () => getAverageColorFromImageUrl($championSkin->getSkinImageAttribute())
);

View File

@@ -28,7 +28,7 @@ class ContactSubmissionController extends Controller
'title' => "{$contactSubmission->category->humanReadable()} - {$contactSubmission->subject}",
'description' => $descriptionContent,
'color' => '#ff8a4c',
]
],
]);
return redirect()->route('contact.index')->with('success', 'Your message has been sent!');

View File

@@ -6,7 +6,6 @@ use App\Models\Champion;
use App\Models\ChampionSkin;
use App\Models\SummonerIcon;
use Illuminate\Support\Facades\Cache;
use Spatie\Sheets\Facades\Sheets;
class HTMLSitemapController extends Controller
@@ -20,7 +19,6 @@ class HTMLSitemapController extends Controller
$icons = Cache::remember('sitemap_iconsCache', $twentyHoursInSeconds, fn () => SummonerIcon::orderBy('title')->get());
$posts = Sheets::all()->sortByDesc('date');
return view('sitemap.index', compact('champions', 'skins', 'icons', 'posts'));
}
}

View File

@@ -2,9 +2,9 @@
namespace App\Http\Controllers;
use CreativeCrafts\Paginate\Facades\Paginate;
use Spatie\Sheets\Facades\Sheets;
use Spatie\Sheets\Sheet;
use CreativeCrafts\Paginate\Facades\Paginate;
class PostsController extends Controller
{

View File

@@ -14,6 +14,7 @@ class SaleController extends Controller
true
);
$salesData = array_filter($shopData, static fn ($collection) => $collection['path'] === '/event/sales');
return reset($salesData)['dynamicCollection']['discountedProductsByProductType'] ?? [];
});