File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,15 @@ composer require --dev lmc/coding-standard
2222``` php
2323<?php declare(strict_types=1);
2424
25+ use Lmc\CodingStandard\Set\SetList;
2526use Symplify\EasyCodingStandard\Config\ECSConfig;
2627
2728return ECSConfig::configure()
2829 ->withPaths([__DIR__ . '/src', __DIR__ . '/tests']) // optionally add 'config' or other directories with PHP files
2930 ->withRootFiles() // to also check ecs.php and all other php files in the root directory
3031 ->withSets(
3132 [
32- __DIR__ . '/vendor/lmc/coding-standard/ecs.php' ,
33+ SetList::ALMACAREER ,
3334 ]
3435 );
3536```
@@ -67,6 +68,7 @@ Below find examples of some more opinionated checks you may want to add dependin
6768``` php
6869<?php declare(strict_types=1);
6970
71+ use Lmc\CodingStandard\Set\SetList;
7072use PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff;
7173use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer;
7274use Symplify\EasyCodingStandard\Config\ECSConfig;
@@ -75,7 +77,7 @@ return ECSConfig::configure()
7577 /* (...) */
7678 ->withSets(
7779 [
78- __DIR__ . '/vendor/lmc/coding-standard/ecs.php' ,
80+ SetList::ALMACAREER ,
7981 ]
8082 )
8183 ->withRules(
Original file line number Diff line number Diff line change 11<?php declare (strict_types=1 );
22
3+ use Lmc \CodingStandard \Set \SetList ;
34use PHP_CodeSniffer \Standards \Generic \Sniffs \PHP \ForbiddenFunctionsSniff ;
45use PhpCsFixer \Fixer \ClassNotation \ClassAttributesSeparationFixer ;
56use PhpCsFixer \Fixer \PhpUnit \PhpUnitTestAnnotationFixer ;
1415 ->withRootFiles ()
1516 ->withSets (
1617 [
17- __DIR__ . ' /ecs.php ' ,
18+ SetList:: ALMACAREER ,
1819 ],
1920 )
2021 ->withConfiguredRule (PhpUnitTestAnnotationFixer::class, ['style ' => 'annotation ' ])
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Lmc \CodingStandard \Set ;
4+
5+ class SetList
6+ {
7+ /**
8+ * @var string
9+ */
10+ public const ALMACAREER = __DIR__ . '/../../ecs.php ' ;
11+ }
You can’t perform that action at this time.
0 commit comments