Skip to content

Commit 42d8dca

Browse files
authored
Stan and Rector
* Type correction * npm Build * Stan me up * Update AbstractBlock.php * Type fixes * Stan Level 4 temp * Clean workbenchs * Add RectorPHP * Builder type fixes * Changes by Rector * Stan and Rector aligned * Update composer.json * Rector fixes * New composer scripts, documented * Rector changes * Fix styling * Update README.md * Update phpstan.neon.dist
1 parent 1101573 commit 42d8dca

File tree

527 files changed

+4426
-3994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

527 files changed

+4426
-3994
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,18 @@ We test Moox using:
223223

224224
Please make sure you use the same tools in VS Code (our [VS Code Extension Pack](https://marketplace.visualstudio.com/items?itemName=adrolli.tallui-laravel-livewire-tailwind) covers this) or do the checks manually before committing to the dev-branch:
225225

226-
- PHPStan: `composer analyse ` or `./vendor/bin/phpstan analyse`, for packages `../../vendor/bin/phpstan analyse`
227-
- Pest: `composer test ` or `./vendor/bin/pest`, for packages `../../vendor/bin/pest`
228-
- Coverage: `composer test-coverage ` or `./vendor/bin/pest --coverage`, for packages `../../vendor/bin/pest --coverage`
229-
- Pint: `composer format ` or `./vendor/bin/pint`, for packages `../../vendor/bin/pint`
226+
- Use `composer lint` to do a dry run of Pint, aliased as `test:lint`
227+
- Use `composer analyse` to run PHPStan, aliased as `analyze` and `test:types`
228+
- Use `composer test` to run the complete test suite
229+
- Use `composer test:refactor` to do a dry run of Rector
230+
- Use `composer test:arch` to run the architecture tests
231+
- Use `composer test:type-coverage` to run the type coverage tests
232+
- Use `composer test:unit` to run pest parallel with coverage
233+
- Use `composer test:coverage` to run pest with coverage
234+
- Use `composer refactor` to run Rector (ATTENTION CHANGES FILES), aliased as `rector`
235+
- Use `composer format` to run Pint (ATTENTION CHANGES FILES), aliased as `pint`
236+
237+
For more information, please see [composer.json](composer.json).
230238

231239
## Admin Navigation
232240

app/Console/Commands/BatchJobCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct()
1616
parent::__construct();
1717
}
1818

19-
public function handle()
19+
public function handle(): void
2020
{
2121
$this->info('Starting Moox Batch Job');
2222

app/Console/Commands/DemoJobCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct()
1616
parent::__construct();
1717
}
1818

19-
public function handle()
19+
public function handle(): void
2020
{
2121
$this->info('Starting Moox Demo Job');
2222

app/Console/Commands/FailJobCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct()
1616
parent::__construct();
1717
}
1818

19-
public function handle()
19+
public function handle(): void
2020
{
2121
$this->info('Starting Moox Fail Job');
2222

app/Console/Commands/LongJobCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct()
1616
parent::__construct();
1717
}
1818

19-
public function handle()
19+
public function handle(): void
2020
{
2121
$this->info('Starting Moox Long Job');
2222

app/Console/Commands/ShortJobCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct()
1616
parent::__construct();
1717
}
1818

19-
public function handle()
19+
public function handle(): void
2020
{
2121
$this->info('Starting Moox Short Job');
2222

app/Console/Commands/TimeoutJobCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct()
1616
parent::__construct();
1717
}
1818

19-
public function handle()
19+
public function handle(): void
2020
{
2121
$this->info('Starting Moox Timeout Job');
2222

app/Console/Kernel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Console\Scheduling\Schedule;
66
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7+
use Override;
78

89
class Kernel extends ConsoleKernel
910
{
@@ -12,6 +13,7 @@ class Kernel extends ConsoleKernel
1213
*
1314
* @return void
1415
*/
16+
#[Override]
1517
protected function schedule(Schedule $schedule)
1618
{
1719
$schedule->command('moox:batchjob')->daily();
@@ -26,6 +28,7 @@ protected function schedule(Schedule $schedule)
2628
*
2729
* @return void
2830
*/
31+
#[Override]
2932
protected function commands()
3033
{
3134
$this->load(__DIR__.'/Commands');

app/Exceptions/Handler.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
namespace App\Exceptions;
44

55
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
6+
use Override;
67
use Throwable;
78

89
class Handler extends ExceptionHandler
910
{
1011
/**
1112
* A list of exception types with their corresponding custom log levels.
1213
*
13-
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
14+
* @var array<class-string<Throwable>, \Psr\Log\LogLevel::*>
1415
*/
1516
protected $levels = [
1617
//
@@ -19,7 +20,7 @@ class Handler extends ExceptionHandler
1920
/**
2021
* A list of the exception types that are not reported.
2122
*
22-
* @var array<int, class-string<\Throwable>>
23+
* @var array<int, class-string<Throwable>>
2324
*/
2425
protected $dontReport = [
2526
//
@@ -38,12 +39,11 @@ class Handler extends ExceptionHandler
3839

3940
/**
4041
* Register the exception handling callbacks for the application.
41-
*
42-
* @return void
4342
*/
44-
public function register()
43+
#[Override]
44+
public function register(): void
4545
{
46-
$this->reportable(function (Throwable $e) {
46+
$this->reportable(function (Throwable $e): void {
4747
//
4848
});
4949
}

app/Http/Controllers/Controller.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99

1010
class Controller extends BaseController
1111
{
12-
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
12+
use AuthorizesRequests;
13+
use DispatchesJobs;
14+
use ValidatesRequests;
1315
}

0 commit comments

Comments
 (0)