File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.gitattributes export-ignore
22.gitignore export-ignore
3- .php-cs-fixer.php export-ignore
43/.github export-ignore
54/assets /src export-ignore
65/assets /babel.config.js export-ignore
76/assets /tsconfig.json export-ignore
87/tests export-ignore
8+ ecs.php export-ignore
99demo.gif export-ignore
1010phpstan.neon export-ignore
1111phpstan-baseline.neon export-ignore
Original file line number Diff line number Diff line change 77 branches : ['1.x']
88
99jobs :
10- php-cs-fixer :
11- name : PHP CS Fixer (PHP ${{ matrix.php-version }})
10+ easy-coding-standard :
11+ name : Easy Coding Standard (PHP ${{ matrix.php-version }})
1212 runs-on : ubuntu-24.04
1313
1414 strategy :
3030 - name : Install Composer dependencies
3131 uses : ramsey/composer-install@v3
3232
33- - name : Run PHP CS Fixer
34- run : ' vendor/bin/php-cs-fixer fix --dry-run - -format=checkstyle | cs2pr'
33+ - name : Run Easy Coding Standard
34+ run : ' vendor/bin/ecs --output -format=checkstyle | cs2pr'
Original file line number Diff line number Diff line change 22/assets /yarn.lock
33/var
44/vendor
5- .php_cs.cache
65.phpunit.result.cache
76composer.lock
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1919 "symfony/translation" : " ^6.4 || ^7.0"
2020 },
2121 "require-dev" : {
22- "friendsofphp/php-cs-fixer" : " ^3.86.0" ,
2322 "phpstan/phpstan" : " ^2.1.22" ,
2423 "phpstan/phpstan-deprecation-rules" : " ^2.0.3" ,
2524 "phpunit/phpunit" : " ^11.1.3" ,
2625 "symfony/asset-mapper" : " ^6.4 || ^7.0" ,
2726 "symfony/framework-bundle" : " ^6.4 || ^7.0" ,
28- "symfony/twig-bundle" : " ^6.4 || ^7.0"
27+ "symfony/twig-bundle" : " ^6.4 || ^7.0" ,
28+ "symplify/easy-coding-standard" : " ^12.5.24"
2929 },
3030 "scripts" : {
3131 "ci" : [
3232 " @cs:dry" ,
3333 " @phpstan" ,
3434 " @phpunit"
3535 ],
36- "cs:dry" : " vendor/bin/php-cs-fixer fix --diff --dry-run --no-interaction --ansi " ,
37- "cs:fix" : " vendor/bin/php-cs-fixer fix --ansi " ,
36+ "cs:dry" : " vendor/bin/ecs " ,
37+ "cs:fix" : " vendor/bin/ecs --fix " ,
3838 "phpstan" : " vendor/bin/phpstan analyse --ansi" ,
3939 "phpunit" : " vendor/bin/phpunit --coverage-html=var/html-coverage --colors=auto"
4040 },
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use PhpCsFixer \Fixer \ControlStructure \NoUselessElseFixer ;
6+ use PhpCsFixer \Fixer \Import \NoUnusedImportsFixer ;
7+ use PhpCsFixer \Fixer \ReturnNotation \NoUselessReturnFixer ;
8+ use PhpCsFixer \Fixer \Strict \DeclareStrictTypesFixer ;
9+ use PhpCsFixer \Fixer \Strict \StrictComparisonFixer ;
10+ use PhpCsFixer \Fixer \Strict \StrictParamFixer ;
11+ use Symplify \EasyCodingStandard \Config \ECSConfig ;
12+
13+ return ECSConfig::configure ()
14+ ->withPaths ([
15+ __DIR__ . '/src ' ,
16+ __DIR__ . '/tests ' ,
17+ ])
18+ ->withRootFiles ()
19+ ->withRules ([
20+ NoUselessElseFixer::class,
21+ NoUselessReturnFixer::class,
22+ StrictComparisonFixer::class,
23+ StrictParamFixer::class,
24+ DeclareStrictTypesFixer::class,
25+ NoUnusedImportsFixer::class,
26+ ])
27+ ->withPhpCsFixerSets (perCS20: true , symfonyRisky: true )
28+ ;
You can’t perform that action at this time.
0 commit comments