Skip to content

Commit

Permalink
make ecs config backwards compatible to php 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Tepper committed Feb 27, 2024
1 parent 9394e5d commit 435be32
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions code-quality/ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@

use PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer;
use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer;
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer;
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer;
use Symplify\CodingStandard\Fixer\LineLength\DocBlockLineLengthFixer;
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return ECSConfig::configure()
->withPaths([
__DIR__ . '/../Classes',
__DIR__ . '/../Tests',
__DIR__ . '/ecs.php',
])
->withPreparedSets(
psr12: true,
common: true,
cleanCode: true,
symplify: true
)
->withPhpCsFixerSets(psr12: true)
->withSets([
SetList::PSR_12,
SetList::COMMON,
SetList::SYMPLIFY,
SetList::CLEAN_CODE,
])
->withConfiguredRule(
LineLengthFixer::class,
[
Expand All @@ -43,5 +44,6 @@
__DIR__ . '/../Classes/TYPO3/Configuration/ExtensionConfiguration.php',
],
DeclareStrictTypesFixer::class => null,
GeneralPhpdocAnnotationRemoveFixer::class => null,
])
->withSpacing(OPTION::INDENTATION_SPACES, "\n");

0 comments on commit 435be32

Please sign in to comment.