File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 3636 $ecsConfig -> paths([__DIR__ . ' /src' ,]);
3737
3838 $ecsConfig -> sets([CodelyRules::CODING_STYLE]);
39+
40+ // Or this if you prefer to have the code aligned
41+ // $ecsConfig -> sets([CodelyRules::CODING_STYLE_ALIGNED]);
3942 };
4043 ` ` `
41443. Execute it:
Original file line number Diff line number Diff line change 77final class CodelyRules
88{
99 public const CODING_STYLE = __DIR__ . '/coding_style.php ' ;
10+ public const CODING_STYLE_ALIGNED = __DIR__ . '/coding_style_aligned.php ' ;
1011}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use PhpCsFixer \Fixer \Operator \BinaryOperatorSpacesFixer ;
6+ use Symplify \EasyCodingStandard \Config \ECSConfig ;
7+
8+ return static function (ECSConfig $ ecsConfig ): void {
9+ $ ecsConfig ->ruleWithConfiguration (
10+ BinaryOperatorSpacesFixer::class,
11+ [
12+ 'operators ' =>
13+ [
14+ '= ' => 'align ' ,
15+ '=> ' => 'align ' ,
16+ ],
17+ ]
18+ );
19+
20+ $ ecsConfig ->sets ([__DIR__ . '/coding_style.php ' ]);
21+ };
You can’t perform that action at this time.
0 commit comments