Skip to content

Commit

Permalink
Merge pull request #15 from pinkary-project/feature/rector-syntax
Browse files Browse the repository at this point in the history
Use new rector syntax
  • Loading branch information
nunomaduro authored Mar 21, 2024
2 parents 01976e2 + 20a7de6 commit 584c0c4
Showing 1 changed file with 16 additions and 25 deletions.
41 changes: 16 additions & 25 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,26 @@

declare(strict_types=1);

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
return RectorConfig::configure()
->withPaths([
__DIR__.'/app',
__DIR__.'/bootstrap/app.php',
__DIR__.'/config',
__DIR__.'/database',
__DIR__.'/public',
]);

$rectorConfig->rules([
InlineConstructorDefaultToPropertyRector::class,
]);

$rectorConfig->skip([
Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector::class,
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_83,
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::TYPE_DECLARATION,
SetList::PRIVATIZATION,
SetList::STRICT_BOOLEANS,
]);
};
])
->withSkip([
AddOverrideAttributeToOverriddenMethodsRector::class,
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
strictBooleans: true,
)
->withPhpSets();

0 comments on commit 584c0c4

Please sign in to comment.