From 5fa130de02ee75622b4ce97fc119852f4d2893b8 Mon Sep 17 00:00:00 2001 From: Rico Date: Mon, 18 Mar 2024 17:06:33 +0000 Subject: [PATCH] Apply fixes from StyleCI --- app/Providers/AppServiceProvider.php | 1 - bootstrap/app.php | 8 ++++---- .../2024_03_18_170123_create_sessions_table.php | 3 +-- public/index.php | 6 +++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 5b0cfc5..19292d6 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -53,7 +53,6 @@ class AppServiceProvider extends ServiceProvider public function bootRoute(): void { - RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); }); diff --git a/bootstrap/app.php b/bootstrap/app.php index 7d59fc2..0aeb3fb 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -10,10 +10,10 @@ return Application::configure(basePath: dirname(__DIR__)) \Scyllaly\HCaptcha\HCaptchaServiceProvider::class, ]) ->withRouting( - web: __DIR__.'/../routes/web.php', - api: __DIR__.'/../routes/api.php', - commands: __DIR__.'/../routes/console.php', - channels: __DIR__.'/../routes/channels.php', + web: __DIR__ . '/../routes/web.php', + api: __DIR__ . '/../routes/api.php', + commands: __DIR__ . '/../routes/console.php', + channels: __DIR__ . '/../routes/channels.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { 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 f60625b..2b2306a 100644 --- a/database/migrations/2024_03_18_170123_create_sessions_table.php +++ b/database/migrations/2024_03_18_170123_create_sessions_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class () extends Migration { /** * Run the migrations. */ diff --git a/public/index.php b/public/index.php index 947d989..74a0960 100644 --- a/public/index.php +++ b/public/index.php @@ -5,13 +5,13 @@ use Illuminate\Http\Request; define('LARAVEL_START', microtime(true)); // Determine if the application is in maintenance mode... -if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { +if (file_exists($maintenance = __DIR__ . '/../storage/framework/maintenance.php')) { require $maintenance; } // Register the Composer autoloader... -require __DIR__.'/../vendor/autoload.php'; +require __DIR__ . '/../vendor/autoload.php'; // Bootstrap Laravel and handle the request... -(require_once __DIR__.'/../bootstrap/app.php') +(require_once __DIR__ . '/../bootstrap/app.php') ->handleRequest(Request::capture());