From 75db6daf45178dbc286bfbdb254573f991182c05 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:24 +0000 Subject: [PATCH 01/13] Apply Laravel coding style Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style). --- app/Models/User.php | 1 - app/Providers/AuthServiceProvider.php | 1 - database/seeders/DatabaseSeeder.php | 1 - tests/Feature/ExampleTest.php | 1 - 4 files changed, 4 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 8996368..79fec77 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,7 +2,6 @@ namespace App\Models; -use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 22b77e6..59e239f 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,7 +3,6 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 71f673f..57b73b5 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,7 +2,6 @@ namespace Database\Seeders; -use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 78ccc21..627a8a0 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -2,7 +2,6 @@ namespace Tests\Feature; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class ExampleTest extends TestCase From 02cb3dfa7bba94ab353f5a12639273363c10a1e7 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:30 +0000 Subject: [PATCH 02/13] Adopt class based routes --- app/Providers/RouteServiceProvider.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 457cb22..0ba5291 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -31,11 +31,9 @@ public function boot() $this->routes(function () { Route::prefix('api') ->middleware('api') - ->namespace($this->namespace) ->group(base_path('routes/api.php')); Route::middleware('web') - ->namespace($this->namespace) ->group(base_path('routes/web.php')); }); } From 70307eeb26ce3f21f08a70800d811cf26b21dc8e Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:31 +0000 Subject: [PATCH 03/13] Remove default `lang` files --- lang/en.json | 7 -- lang/en/auth.php | 20 ----- lang/en/pagination.php | 19 ----- lang/en/passwords.php | 22 ------ lang/en/validation.php | 163 ----------------------------------------- 5 files changed, 231 deletions(-) delete mode 100644 lang/en.json delete mode 100644 lang/en/auth.php delete mode 100644 lang/en/pagination.php delete mode 100644 lang/en/passwords.php delete mode 100644 lang/en/validation.php diff --git a/lang/en.json b/lang/en.json deleted file mode 100644 index 577680d..0000000 --- a/lang/en.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "The :attribute must contain at least one letter.": "The :attribute must contain at least one letter.", - "The :attribute must contain at least one number.": "The :attribute must contain at least one number.", - "The :attribute must contain at least one symbol.": "The :attribute must contain at least one symbol.", - "The :attribute must contain at least one uppercase and one lowercase letter.": "The :attribute must contain at least one uppercase and one lowercase letter.", - "The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute." -} diff --git a/lang/en/auth.php b/lang/en/auth.php deleted file mode 100644 index 6598e2c..0000000 --- a/lang/en/auth.php +++ /dev/null @@ -1,20 +0,0 @@ - 'These credentials do not match our records.', - 'password' => 'The provided password is incorrect.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - -]; diff --git a/lang/en/pagination.php b/lang/en/pagination.php deleted file mode 100644 index d481411..0000000 --- a/lang/en/pagination.php +++ /dev/null @@ -1,19 +0,0 @@ - '« Previous', - 'next' => 'Next »', - -]; diff --git a/lang/en/passwords.php b/lang/en/passwords.php deleted file mode 100644 index 2345a56..0000000 --- a/lang/en/passwords.php +++ /dev/null @@ -1,22 +0,0 @@ - 'Your password has been reset!', - 'sent' => 'We have emailed your password reset link!', - 'throttled' => 'Please wait before retrying.', - 'token' => 'This password reset token is invalid.', - 'user' => "We can't find a user with that email address.", - -]; diff --git a/lang/en/validation.php b/lang/en/validation.php deleted file mode 100644 index 4707f1a..0000000 --- a/lang/en/validation.php +++ /dev/null @@ -1,163 +0,0 @@ - 'The :attribute must be accepted.', - 'accepted_if' => 'The :attribute must be accepted when :other is :value.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute must only contain letters.', - 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute must only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ - 'array' => 'The :attribute must have between :min and :max items.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'numeric' => 'The :attribute must be between :min and :max.', - 'string' => 'The :attribute must be between :min and :max characters.', - ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'declined' => 'The :attribute must be declined.', - 'declined_if' => 'The :attribute must be declined when :other is :value.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values.', - 'enum' => 'The selected :attribute is invalid.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'gt' => [ - 'array' => 'The :attribute must have more than :value items.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'numeric' => 'The :attribute must be greater than :value.', - 'string' => 'The :attribute must be greater than :value characters.', - ], - 'gte' => [ - 'array' => 'The :attribute must have :value items or more.', - 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be greater than or equal to :value.', - 'string' => 'The :attribute must be greater than or equal to :value characters.', - ], - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'lt' => [ - 'array' => 'The :attribute must have less than :value items.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'numeric' => 'The :attribute must be less than :value.', - 'string' => 'The :attribute must be less than :value characters.', - ], - 'lte' => [ - 'array' => 'The :attribute must not have more than :value items.', - 'file' => 'The :attribute must be less than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be less than or equal to :value.', - 'string' => 'The :attribute must be less than or equal to :value characters.', - ], - 'mac_address' => 'The :attribute must be a valid MAC address.', - 'max' => [ - 'array' => 'The :attribute must not have more than :max items.', - 'file' => 'The :attribute must not be greater than :max kilobytes.', - 'numeric' => 'The :attribute must not be greater than :max.', - 'string' => 'The :attribute must not be greater than :max characters.', - ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ - 'array' => 'The :attribute must have at least :min items.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'numeric' => 'The :attribute must be at least :min.', - 'string' => 'The :attribute must be at least :min characters.', - ], - 'multiple_of' => 'The :attribute must be a multiple of :value.', - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'password' => 'The password is incorrect.', - 'present' => 'The :attribute field must be present.', - 'prohibited' => 'The :attribute field is prohibited.', - 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', - 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', - 'prohibits' => 'The :attribute field prohibits :other from being present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_array_keys' => 'The :attribute field must contain entries for: :values.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values are present.', - 'required_without' => 'The :attribute field is required when :values is not present.', - 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ - 'array' => 'The :attribute must contain :size items.', - 'file' => 'The :attribute must be :size kilobytes.', - 'numeric' => 'The :attribute must be :size.', - 'string' => 'The :attribute must be :size characters.', - ], - 'starts_with' => 'The :attribute must start with one of the following: :values.', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid timezone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute must be a valid URL.', - 'uuid' => 'The :attribute must be a valid UUID.', - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => [ - 'attribute-name' => [ - 'rule-name' => 'custom-message', - ], - ], - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap our attribute placeholder - | with something more reader friendly such as "E-Mail Address" instead - | of "email". This simply helps us make our message more expressive. - | - */ - - 'attributes' => [], - -]; From e44bfeb1f98bedd37b50dc0d5d6e37cd55f236b3 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:31 +0000 Subject: [PATCH 04/13] Remove explicit call to register policies --- app/Providers/AuthServiceProvider.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 59e239f..c2a87e8 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -22,8 +22,6 @@ class AuthServiceProvider extends ServiceProvider */ public function boot() { - $this->registerPolicies(); - // } } From b1ea7df86e8ae4a29ed093f56ad304d1d7e9ed1f Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:32 +0000 Subject: [PATCH 05/13] Remove `fruitcake/laravel-cors` dependency --- app/Http/Kernel.php | 2 +- composer.json | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index d3722c2..4f18062 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -16,7 +16,7 @@ class Kernel extends HttpKernel protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, + \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, diff --git a/composer.json b/composer.json index 0aa742e..04a97cf 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,13 @@ "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", - "keywords": ["framework", "laravel"], + "keywords": [ + "framework", + "laravel" + ], "license": "MIT", "require": { "php": "^8.0.2", - "fruitcake/laravel-cors": "^2.0.5", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^9.0", "laravel/sanctum": "^2.14", From 7a63c7787df88b21806d53fbb73ff69b6dca2c88 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:45 +0000 Subject: [PATCH 06/13] Shift core files --- app/Console/Kernel.php | 9 ++------ app/Exceptions/Handler.php | 17 +++++++++----- app/Http/Controllers/Controller.php | 3 +-- app/Http/Kernel.php | 12 +++++----- app/Http/Middleware/Authenticate.php | 10 +++------ .../Middleware/RedirectIfAuthenticated.php | 8 +++---- app/Http/Middleware/TrustHosts.php | 2 +- app/Http/Middleware/ValidateSignature.php | 22 +++++++++++++++++++ app/Providers/AppServiceProvider.php | 8 ++----- app/Providers/BroadcastServiceProvider.php | 4 +--- app/Providers/EventServiceProvider.php | 10 +++------ app/Providers/RouteServiceProvider.php | 16 +++++--------- database/factories/UserFactory.php | 18 +++++++-------- database/seeders/DatabaseSeeder.php | 10 ++++++--- tests/CreatesApplication.php | 5 ++--- 15 files changed, 79 insertions(+), 75 deletions(-) create mode 100644 app/Http/Middleware/ValidateSignature.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d8bc1d2..e6b9960 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -9,21 +9,16 @@ class Kernel extends ConsoleKernel { /** * Define the application's command schedule. - * - * @param \Illuminate\Console\Scheduling\Schedule $schedule - * @return void */ - protected function schedule(Schedule $schedule) + protected function schedule(Schedule $schedule): void { // $schedule->command('inspire')->hourly(); } /** * Register the commands for the application. - * - * @return void */ - protected function commands() + protected function commands(): void { $this->load(__DIR__.'/Commands'); diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8e7fbd1..b1c262c 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -7,17 +7,26 @@ class Handler extends ExceptionHandler { + /** + * A list of exception types with their corresponding custom log levels. + * + * @var array, \Psr\Log\LogLevel::*> + */ + protected $levels = [ + // + ]; + /** * A list of the exception types that are not reported. * - * @var array> + * @var array> */ protected $dontReport = [ // ]; /** - * A list of the inputs that are never flashed for validation exceptions. + * A list of the inputs that are never flashed to the session on validation exceptions. * * @var array */ @@ -29,10 +38,8 @@ class Handler extends ExceptionHandler /** * Register the exception handling callbacks for the application. - * - * @return void */ - public function register() + public function register(): void { $this->reportable(function (Throwable $e) { // diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a0a2a8a..77ec359 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -3,11 +3,10 @@ namespace App\Http\Controllers; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; -use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { - use AuthorizesRequests, DispatchesJobs, ValidatesRequests; + use AuthorizesRequests, ValidatesRequests; } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 4f18062..c34cdcf 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -33,7 +33,6 @@ class Kernel extends HttpKernel \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, @@ -41,26 +40,27 @@ class Kernel extends HttpKernel 'api' => [ // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - 'throttle:api', + \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', \Illuminate\Routing\Middleware\SubstituteBindings::class, ], ]; /** - * The application's route middleware. + * The application's middleware aliases. * - * These middleware may be assigned to groups or used individually. + * Aliases may be used to conveniently assign middleware to routes and groups. * * @var array */ - protected $routeMiddleware = [ + protected $middlewareAliases = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, + 'signed' => \App\Http\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, ]; diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 704089a..d4ef644 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -3,19 +3,15 @@ namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; +use Illuminate\Http\Request; class Authenticate extends Middleware { /** * Get the path the user should be redirected to when they are not authenticated. - * - * @param \Illuminate\Http\Request $request - * @return string|null */ - protected function redirectTo($request) + protected function redirectTo(Request $request): ?string { - if (! $request->expectsJson()) { - return route('login'); - } + return $request->expectsJson() ? null : route('login'); } } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index a2813a0..afc78c4 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -6,18 +6,16 @@ use Closure; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Symfony\Component\HttpFoundation\Response; class RedirectIfAuthenticated { /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next - * @param string|null ...$guards - * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse + * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next */ - public function handle(Request $request, Closure $next, ...$guards) + public function handle(Request $request, Closure $next, string ...$guards): Response { $guards = empty($guards) ? [null] : $guards; diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php index 7186414..c9c58bd 100644 --- a/app/Http/Middleware/TrustHosts.php +++ b/app/Http/Middleware/TrustHosts.php @@ -11,7 +11,7 @@ class TrustHosts extends Middleware * * @return array */ - public function hosts() + public function hosts(): array { return [ $this->allSubdomainsOfApplicationUrl(), diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php new file mode 100644 index 0000000..093bf64 --- /dev/null +++ b/app/Http/Middleware/ValidateSignature.php @@ -0,0 +1,22 @@ + + */ + protected $except = [ + // 'fbclid', + // 'utm_campaign', + // 'utm_content', + // 'utm_medium', + // 'utm_source', + // 'utm_term', + ]; +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index ee8ca5b..452e6b6 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -8,20 +8,16 @@ class AppServiceProvider extends ServiceProvider { /** * Register any application services. - * - * @return void */ - public function register() + public function register(): void { // } /** * Bootstrap any application services. - * - * @return void */ - public function boot() + public function boot(): void { // } diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 395c518..2be04f5 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -9,10 +9,8 @@ class BroadcastServiceProvider extends ServiceProvider { /** * Bootstrap any application services. - * - * @return void */ - public function boot() + public function boot(): void { Broadcast::routes(); diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 45ca668..2d65aac 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -10,7 +10,7 @@ class EventServiceProvider extends ServiceProvider { /** - * The event listener mappings for the application. + * The event to listener mappings for the application. * * @var array> */ @@ -22,20 +22,16 @@ class EventServiceProvider extends ServiceProvider /** * Register any events for your application. - * - * @return void */ - public function boot() + public function boot(): void { // } /** * Determine if events and listeners should be automatically discovered. - * - * @return bool */ - public function shouldDiscoverEvents() + public function shouldDiscoverEvents(): bool { return false; } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 0ba5291..bc49109 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -13,24 +13,22 @@ class RouteServiceProvider extends ServiceProvider /** * The path to the "home" route for your application. * - * This is used by Laravel authentication to redirect users after login. + * Typically, users are redirected here after authentication. * * @var string */ public const HOME = '/home'; /** - * Define your route model bindings, pattern filters, etc. - * - * @return void + * Define your route model bindings, pattern filters, and other route configuration. */ - public function boot() + public function boot(): void { $this->configureRateLimiting(); $this->routes(function () { - Route::prefix('api') - ->middleware('api') + Route::middleware('api') + ->prefix('api') ->group(base_path('routes/api.php')); Route::middleware('web') @@ -40,10 +38,8 @@ public function boot() /** * Configure the rate limiters for the application. - * - * @return void */ - protected function configureRateLimiting() + protected function configureRateLimiting(): void { RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 23b61d2..d4e8835 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -15,11 +15,11 @@ class UserFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ - 'name' => $this->faker->name(), - 'email' => $this->faker->unique()->safeEmail(), + 'name' => fake()->name(), + 'email' => fake()->unique()->safeEmail(), 'email_verified_at' => now(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'remember_token' => Str::random(10), @@ -29,14 +29,12 @@ public function definition() /** * Indicate that the model's email address should be unverified. * - * @return static + * @return $this */ - public function unverified() + public function unverified(): static { - return $this->state(function (array $attributes) { - return [ - 'email_verified_at' => null, - ]; - }); + return $this->state(fn (array $attributes) => [ + 'email_verified_at' => null, + ]); } } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 57b73b5..a9f4519 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,17 +2,21 @@ namespace Database\Seeders; +// use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. - * - * @return void */ - public function run() + public function run(): void { // \App\Models\User::factory(10)->create(); + + // \App\Models\User::factory()->create([ + // 'name' => 'Test User', + // 'email' => 'test@example.com', + // ]); } } diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 547152f..cc68301 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -3,15 +3,14 @@ namespace Tests; use Illuminate\Contracts\Console\Kernel; +use Illuminate\Foundation\Application; trait CreatesApplication { /** * Creates the application. - * - * @return \Illuminate\Foundation\Application */ - public function createApplication() + public function createApplication(): Application { $app = require __DIR__.'/../bootstrap/app.php'; From 5401110f1f41793ecdce268495768abfa4a53dfe Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:49 +0000 Subject: [PATCH 07/13] Shift config files --- config/app.php | 18 ++++++++++++++++++ config/broadcasting.php | 7 +++++-- config/cache.php | 6 +++--- config/database.php | 4 ++++ config/filesystems.php | 5 ++++- config/logging.php | 5 ++++- config/mail.php | 9 ++++++++- config/sanctum.php | 4 +++- config/services.php | 1 + 9 files changed, 50 insertions(+), 9 deletions(-) diff --git a/config/app.php b/config/app.php index 7c60cd9..81d1035 100644 --- a/config/app.php +++ b/config/app.php @@ -125,6 +125,24 @@ 'cipher' => 'AES-256-CBC', + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => 'file', + // 'store' => 'redis', + ], + /* |-------------------------------------------------------------------------- | Autoloaded Service Providers diff --git a/config/broadcasting.php b/config/broadcasting.php index 67fcbbd..9e4d4aa 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -36,8 +36,11 @@ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'useTLS' => true, + 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', + 'port' => env('PUSHER_PORT', 443), + 'scheme' => env('PUSHER_SCHEME', 'https'), + 'encrypted' => true, + 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', ], 'client_options' => [ // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html diff --git a/config/cache.php b/config/cache.php index 0ad5c74..33bb295 100644 --- a/config/cache.php +++ b/config/cache.php @@ -99,9 +99,9 @@ | Cache Key Prefix |-------------------------------------------------------------------------- | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. | */ diff --git a/config/database.php b/config/database.php index 0faebae..137ad18 100644 --- a/config/database.php +++ b/config/database.php @@ -89,6 +89,8 @@ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), ], ], @@ -129,6 +131,7 @@ 'default' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_DB', '0'), @@ -137,6 +140,7 @@ 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), + 'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_CACHE_DB', '1'), diff --git a/config/filesystems.php b/config/filesystems.php index cf5abce..e9d9dbd 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -22,7 +22,7 @@ | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. + | been set up for each driver as an example of the required values. | | Supported Drivers: "local", "ftp", "sftp", "s3" | @@ -33,6 +33,7 @@ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), + 'throw' => false, ], 'public' => [ @@ -40,6 +41,7 @@ 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', + 'throw' => false, ], 's3' => [ @@ -51,6 +53,7 @@ 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, ], ], diff --git a/config/logging.php b/config/logging.php index fefe088..5aa1dbb 100644 --- a/config/logging.php +++ b/config/logging.php @@ -30,7 +30,10 @@ | */ - 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], /* |-------------------------------------------------------------------------- diff --git a/config/mail.php b/config/mail.php index 87b6fe3..049052f 100644 --- a/config/mail.php +++ b/config/mail.php @@ -42,6 +42,7 @@ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN'), ], 'ses' => [ @@ -50,15 +51,21 @@ 'mailgun' => [ 'transport' => 'mailgun', + // 'client' => [ + // 'timeout' => 5, + // ], ], 'postmark' => [ 'transport' => 'postmark', + // 'client' => [ + // 'timeout' => 5, + // ], ], 'sendmail' => [ 'transport' => 'sendmail', - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'), + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), ], 'log' => [ diff --git a/config/sanctum.php b/config/sanctum.php index 9281c92..529cfdc 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -1,5 +1,7 @@ explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( '%s%s', 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', - env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : '' + Sanctum::currentApplicationUrlWithPort() ))), /* diff --git a/config/services.php b/config/services.php index 2a1d616..0ace530 100644 --- a/config/services.php +++ b/config/services.php @@ -18,6 +18,7 @@ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', ], 'postmark' => [ From 9b474a476e2d47fea55a2f9f845870c33902e459 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:49 +0000 Subject: [PATCH 08/13] Default config files In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used. --- config/auth.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/auth.php b/config/auth.php index d8c6cee..d83996a 100644 --- a/config/auth.php +++ b/config/auth.php @@ -84,6 +84,10 @@ | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | + | The throttle setting is the number of seconds a user must wait before + | generating more password reset tokens. This prevents the user from + | quickly generating a very large amount of password reset tokens. + | */ 'passwords' => [ From 1faf39b17710899772f343815cb2d4d3e4e3c30f Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:50 +0000 Subject: [PATCH 09/13] Bump Laravel dependencies --- composer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 04a97cf..6e6212e 100644 --- a/composer.json +++ b/composer.json @@ -8,19 +8,19 @@ ], "license": "MIT", "require": { - "php": "^8.0.2", + "php": "^8.1", "guzzlehttp/guzzle": "^7.2", - "laravel/framework": "^9.0", - "laravel/sanctum": "^2.14", - "laravel/tinker": "^2.7" + "laravel/framework": "^10.0", + "laravel/sanctum": "^3.2", + "laravel/tinker": "^2.8" }, "require-dev": { "fakerphp/faker": "^1.9.1", - "laravel/sail": "^1.0.1", + "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^6.1", "phpunit/phpunit": "^9.5.10", - "spatie/laravel-ignition": "^1.0" + "spatie/laravel-ignition": "^2.0" }, "autoload": { "psr-4": { @@ -59,6 +59,6 @@ "preferred-install": "dist", "sort-packages": true }, - "minimum-stability": "dev", + "minimum-stability": "stable", "prefer-stable": true } From f12fa3db8e26be9bf3d22460c8d54279b9941203 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:51 +0000 Subject: [PATCH 10/13] Rename `password_resets` table --- config/auth.php | 2 +- ...19_000000_rename_password_resets_table.php | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2023_02_19_000000_rename_password_resets_table.php diff --git a/config/auth.php b/config/auth.php index d83996a..cae0028 100644 --- a/config/auth.php +++ b/config/auth.php @@ -93,7 +93,7 @@ 'passwords' => [ 'users' => [ 'provider' => 'users', - 'table' => 'password_resets', + 'table' => 'password_reset_tokens', 'expire' => 60, 'throttle' => 60, ], diff --git a/database/migrations/2023_02_19_000000_rename_password_resets_table.php b/database/migrations/2023_02_19_000000_rename_password_resets_table.php new file mode 100644 index 0000000..7ea51ce --- /dev/null +++ b/database/migrations/2023_02_19_000000_rename_password_resets_table.php @@ -0,0 +1,28 @@ + Date: Sun, 19 Feb 2023 23:58:56 +0000 Subject: [PATCH 11/13] Add PHP type hints for Laravel 10 --- app/Providers/AuthServiceProvider.php | 2 +- database/migrations/2014_10_12_000000_create_users_table.php | 4 ++-- .../2014_10_12_100000_create_password_resets_table.php | 4 ++-- .../migrations/2019_08_19_000000_create_failed_jobs_table.php | 4 ++-- .../2019_12_14_000001_create_personal_access_tokens_table.php | 4 ++-- .../2023_02_19_000000_rename_password_resets_table.php | 4 ++-- tests/Feature/ExampleTest.php | 2 +- tests/Unit/ExampleTest.php | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index c2a87e8..f2b7b10 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -20,7 +20,7 @@ class AuthServiceProvider extends ServiceProvider * * @return void */ - public function boot() + public function boot(): void { // } 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 cf6b776..2b07d7b 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -11,7 +11,7 @@ * * @return void */ - public function up() + public function up(): void { Schema::create('users', function (Blueprint $table) { $table->id(); @@ -29,7 +29,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('users'); } diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index fcacb80..b4d45de 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -11,7 +11,7 @@ * * @return void */ - public function up() + public function up(): void { Schema::create('password_resets', function (Blueprint $table) { $table->string('email')->index(); @@ -25,7 +25,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('password_resets'); } 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 1719198..db96e7d 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 @@ -11,7 +11,7 @@ * * @return void */ - public function up() + public function up(): void { Schema::create('failed_jobs', function (Blueprint $table) { $table->id(); @@ -29,7 +29,7 @@ public function up() * * @return void */ - public function down() + 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 fd235f8..a2b3575 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 @@ -11,7 +11,7 @@ * * @return void */ - public function up() + public function up(): void { Schema::create('personal_access_tokens', function (Blueprint $table) { $table->id(); @@ -29,7 +29,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('personal_access_tokens'); } diff --git a/database/migrations/2023_02_19_000000_rename_password_resets_table.php b/database/migrations/2023_02_19_000000_rename_password_resets_table.php index 7ea51ce..ab300e6 100644 --- a/database/migrations/2023_02_19_000000_rename_password_resets_table.php +++ b/database/migrations/2023_02_19_000000_rename_password_resets_table.php @@ -11,7 +11,7 @@ * * @return void */ - public function up() + public function up(): void { Schema::rename('password_resets', 'password_reset_tokens'); } @@ -21,7 +21,7 @@ public function up() * * @return void */ - public function down() + public function down(): void { Schema::rename('password_reset_tokens', 'password_resets'); } diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 627a8a0..426fb4e 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -11,7 +11,7 @@ class ExampleTest extends TestCase * * @return void */ - public function test_the_application_returns_a_successful_response() + public function test_the_application_returns_a_successful_response(): void { $response = $this->get('/'); diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index e5c5fef..d809638 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -11,7 +11,7 @@ class ExampleTest extends TestCase * * @return void */ - public function test_that_true_is_true() + public function test_that_true_is_true(): void { $this->assertTrue(true); } From 3bec7a53163413c2a93a13d11d928afcbffa6eca Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:58:56 +0000 Subject: [PATCH 12/13] Remove redundant typing from DocBlocks --- app/Http/Middleware/RedirectIfAuthenticated.php | 2 +- app/Providers/AuthServiceProvider.php | 2 -- database/factories/UserFactory.php | 2 -- database/migrations/2014_10_12_000000_create_users_table.php | 4 ---- .../2014_10_12_100000_create_password_resets_table.php | 4 ---- .../migrations/2019_08_19_000000_create_failed_jobs_table.php | 4 ---- .../2019_12_14_000001_create_personal_access_tokens_table.php | 4 ---- .../2023_02_19_000000_rename_password_resets_table.php | 4 ---- tests/Feature/ExampleTest.php | 2 -- tests/Unit/ExampleTest.php | 2 -- 10 files changed, 1 insertion(+), 29 deletions(-) diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index afc78c4..4b2af74 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -13,7 +13,7 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next + * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next */ public function handle(Request $request, Closure $next, string ...$guards): Response { diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index f2b7b10..f4607be 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -17,8 +17,6 @@ class AuthServiceProvider extends ServiceProvider /** * Register any authentication / authorization services. - * - * @return void */ public function boot(): void { diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index d4e8835..a6ecc0a 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -28,8 +28,6 @@ public function definition(): array /** * Indicate that the model's email address should be unverified. - * - * @return $this */ public function unverified(): static { 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 2b07d7b..444fafb 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -8,8 +8,6 @@ { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -26,8 +24,6 @@ public function up(): void /** * Reverse the migrations. - * - * @return void */ public function down(): void { diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index b4d45de..4f42fe6 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -8,8 +8,6 @@ { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -22,8 +20,6 @@ public function up(): void /** * Reverse the migrations. - * - * @return void */ public function down(): void { 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 db96e7d..249da81 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 @@ -8,8 +8,6 @@ { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -26,8 +24,6 @@ public function up(): void /** * Reverse the migrations. - * - * @return void */ public function down(): void { 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 a2b3575..e43a6a6 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 @@ -8,8 +8,6 @@ { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -26,8 +24,6 @@ public function up(): void /** * Reverse the migrations. - * - * @return void */ public function down(): void { diff --git a/database/migrations/2023_02_19_000000_rename_password_resets_table.php b/database/migrations/2023_02_19_000000_rename_password_resets_table.php index ab300e6..f0ad375 100644 --- a/database/migrations/2023_02_19_000000_rename_password_resets_table.php +++ b/database/migrations/2023_02_19_000000_rename_password_resets_table.php @@ -8,8 +8,6 @@ { /** * Run the migrations. - * - * @return void */ public function up(): void { @@ -18,8 +16,6 @@ public function up(): void /** * Reverse the migrations. - * - * @return void */ public function down(): void { diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 426fb4e..8dec38c 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -8,8 +8,6 @@ class ExampleTest extends TestCase { /** * A basic test example. - * - * @return void */ public function test_the_application_returns_a_successful_response(): void { diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index d809638..5773b0c 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -8,8 +8,6 @@ class ExampleTest extends TestCase { /** * A basic test example. - * - * @return void */ public function test_that_true_is_true(): void { From b10e97a06583476b92414caccb747a9372cbb4b9 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 23:59:00 +0000 Subject: [PATCH 13/13] Shift cleanup --- .../2023_02_19_000000_rename_password_resets_table.php | 1 - 1 file changed, 1 deletion(-) diff --git a/database/migrations/2023_02_19_000000_rename_password_resets_table.php b/database/migrations/2023_02_19_000000_rename_password_resets_table.php index f0ad375..c3f9489 100644 --- a/database/migrations/2023_02_19_000000_rename_password_resets_table.php +++ b/database/migrations/2023_02_19_000000_rename_password_resets_table.php @@ -1,7 +1,6 @@