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
22
22
``` php
23
23
<?php declare(strict_types=1);
24
24
25
+ use Lmc\CodingStandard\Set\SetList;
25
26
use Symplify\EasyCodingStandard\Config\ECSConfig;
26
27
27
28
return ECSConfig::configure()
28
29
->withPaths([__DIR__ . '/src', __DIR__ . '/tests']) // optionally add 'config' or other directories with PHP files
29
30
->withRootFiles() // to also check ecs.php and all other php files in the root directory
30
31
->withSets(
31
32
[
32
- __DIR__ . '/vendor/lmc/coding-standard/ecs.php' ,
33
+ SetList::ALMACAREER ,
33
34
]
34
35
);
35
36
```
@@ -67,6 +68,7 @@ Below find examples of some more opinionated checks you may want to add dependin
67
68
``` php
68
69
<?php declare(strict_types=1);
69
70
71
+ use Lmc\CodingStandard\Set\SetList;
70
72
use PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff;
71
73
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer;
72
74
use Symplify\EasyCodingStandard\Config\ECSConfig;
@@ -75,7 +77,7 @@ return ECSConfig::configure()
75
77
/* (...) */
76
78
->withSets(
77
79
[
78
- __DIR__ . '/vendor/lmc/coding-standard/ecs.php' ,
80
+ SetList::ALMACAREER ,
79
81
]
80
82
)
81
83
->withRules(
Original file line number Diff line number Diff line change 1
1
<?php declare (strict_types=1 );
2
2
3
+ use Lmc \CodingStandard \Set \SetList ;
3
4
use PHP_CodeSniffer \Standards \Generic \Sniffs \PHP \ForbiddenFunctionsSniff ;
4
5
use PhpCsFixer \Fixer \ClassNotation \ClassAttributesSeparationFixer ;
5
6
use PhpCsFixer \Fixer \PhpUnit \PhpUnitTestAnnotationFixer ;
14
15
->withRootFiles ()
15
16
->withSets (
16
17
[
17
- __DIR__ . ' /ecs.php ' ,
18
+ SetList:: ALMACAREER ,
18
19
],
19
20
)
20
21
->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