Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

Commit 1ac354b

Browse files
Merge pull request #300 from CodeWithDennis/rector
Add rector/rector with initial setup and run it
2 parents 6fb54ee + b556a8d commit 1ac354b

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"laravel/pint": "^1.14",
3232
"nunomaduro/collision": "^v8.8.2",
3333
"phpstan/extension-installer": "^1.1",
34-
"phpstan/phpstan-deprecation-rules": "^1.0"
34+
"phpstan/phpstan-deprecation-rules": "^1.0",
35+
"rector/rector": "^1.2"
3536
},
3637
"autoload": {
3738
"psr-4": {

rector.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
use Rector\Set\ValueObject\LevelSetList;
7+
use Rector\Set\ValueObject\SetList;
8+
9+
return RectorConfig::configure()
10+
->withPaths([
11+
__DIR__.'/config',
12+
__DIR__.'/resources',
13+
__DIR__.'/src',
14+
])
15+
->withSets([
16+
LevelSetList::UP_TO_PHP_82,
17+
SetList::CODE_QUALITY,
18+
SetList::DEAD_CODE,
19+
SetList::EARLY_RETURN,
20+
SetList::TYPE_DECLARATION,
21+
]);

src/Commands/FilamentTestsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class FilamentTestsCommand extends Command
1414

1515
protected $description = 'Create a new test for a Filament component';
1616

17-
public function handle()
17+
public function handle(): void
1818
{
1919
// TODO: THIS IS JUST TESTING STUFF
2020
$resource = UserResource::class;

0 commit comments

Comments
 (0)