Skip to content

Commit

Permalink
Adjust standards
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSylwio committed Oct 2, 2023
1 parent 57f2ad5 commit 417ce15
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
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;

return static function (ECSConfig $ecsConfig): void {
$ecsConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/ecs.php',
]);

$ecsConfig->sets([
Expand All @@ -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
]);
};
12 changes: 12 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 417ce15

Please sign in to comment.