From 179cc8daa160e5bdcc8189c09e57bddb5d6207ed Mon Sep 17 00:00:00 2001 From: Jeffrey Davidson <3826104+JeffreyDavidson@users.noreply.github.com> Date: Tue, 10 Jun 2025 12:21:40 -0400 Subject: [PATCH 1/2] refactor(tooling): create composer scripts t run common checks --- composer.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ab7c34a..7b26b34 100644 --- a/composer.json +++ b/composer.json @@ -60,9 +60,19 @@ "Composer\\Config::disableProcessTimeout", "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite" ], + "rector": "rector", + "lint": "pint", + "test:rector": "rector --dry-run", + "test:lint": "pint --test", + "test:types": "phpstan analyse", + "test:unit": "pest --colors=always --parallel --coverage --exactly=100", + "test:type-coverage": "pest --type-coverage --min=100", "test": [ - "@php artisan config:clear --ansi", - "@php artisan test" + "@test:type-coverage", + "@test:rector", + "@test:lint", + "@test:types", + "@test:unit" ] }, "extra": { From 7e7fbb9636cfc5a929fbe1ddff4112977625aa37 Mon Sep 17 00:00:00 2001 From: Jeffrey Davidson <3826104+JeffreyDavidson@users.noreply.github.com> Date: Tue, 10 Jun 2025 12:24:22 -0400 Subject: [PATCH 2/2] style(tooling): apply changes from rector --- tests/Feature/ExampleTest.php | 2 +- tests/Pest.php | 2 +- tests/Unit/ExampleTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index fa98747..6135cd9 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -2,7 +2,7 @@ use function Pest\Laravel\get; -test('the application returns a successful response', function () { +test('the application returns a successful response', function (): void { $response = get('/'); $response->assertStatus(200); diff --git a/tests/Pest.php b/tests/Pest.php index 24705f8..ad6a7cc 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -37,7 +37,7 @@ | */ -function something() +function something(): void { // .. } diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 44a4f33..963bc0c 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -1,5 +1,5 @@ toBeTrue(); });