Apply fixes from StyleCI

This commit is contained in:
Rico
2023-12-05 14:41:37 +00:00
committed by StyleCI Bot
parent 39567c861c
commit 8fa2d066c8

View File

@@ -1,6 +1,7 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
class SaleController extends Controller class SaleController extends Controller
@@ -8,8 +9,10 @@ class SaleController extends Controller
public function index() public function index()
{ {
$sales = Cache::remember('sales_data', 60 * 60 * 8, function () { $sales = Cache::remember('sales_data', 60 * 60 * 8, function () {
$shopData = json_decode(file_get_contents('https://api.shop.riotgames.com/v3/collections/'), $shopData = json_decode(
true); file_get_contents('https://api.shop.riotgames.com/v3/collections/'),
true
);
$salesData = array_filter($shopData, function ($collection) { $salesData = array_filter($shopData, function ($collection) {
return $collection['path'] === '/event/sales'; return $collection['path'] === '/event/sales';
}); });