diff --git a/ecs.php b/ecs.php index 84cd739..1a0d455 100644 --- a/ecs.php +++ b/ecs.php @@ -3,6 +3,8 @@ declare(strict_types=1); use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer; +use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer; +use PhpCsFixer\Fixer\Phpdoc\PhpdocLineSpanFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; use Symplify\EasyCodingStandard\ValueObject\Set\SetList; @@ -10,6 +12,7 @@ $ecsConfig->paths([ __DIR__ . '/src', __DIR__ . '/tests', + __DIR__ . '/ecs.php', ]); $ecsConfig->sets([ @@ -25,4 +28,15 @@ $ecsConfig->ruleWithConfiguration(TrailingCommaInMultilineFixer::class, [ 'elements' => ['arguments', 'arrays', 'match', 'parameters'], ]); + + $ecsConfig->ruleWithConfiguration(PhpdocLineSpanFixer::class, [ + 'const' => 'single', + 'property' => 'single', + 'method' => 'single', + ]); + + $ecsConfig->skip([ + NotOperatorWithSuccessorSpaceFixer::class, +// __DIR__ . '/tests/Application', # Uncomment for Sylius plugins + ]); }; diff --git a/rector.php b/rector.php index 94a7196..3e58870 100644 --- a/rector.php +++ b/rector.php @@ -4,12 +4,24 @@ use Rector\Config\RectorConfig; use Rector\Doctrine\Set\DoctrineSetList; +use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; use Rector\PHPUnit\Set\PHPUnitLevelSetList; +use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; use Rector\Symfony\Set\SymfonySetList; return static function (RectorConfig $rectorConfig): void { + $rectorConfig->skip([ +// __DIR__ . '/tests/Application', # Uncomment for Sylius plugins + FinalizeClassesWithoutChildrenRector::class => [ + __DIR__ . '/src/Entity', + ], + ClassPropertyAssignToConstructorPromotionRector::class => [ + __DIR__ . '/src/Entity', + ], + ]); + $rectorConfig->paths([ __DIR__ . '/src', __DIR__ . '/tests',