File tree Expand file tree Collapse file tree 5 files changed +89
-17
lines changed Expand file tree Collapse file tree 5 files changed +89
-17
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ cs: ## Run code style check
3737 @echo " ------------------"
3838 @echo " - PHP code style -"
3939 @echo " ------------------"
40- $(DOCKER_RUN ) bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php -vvv
40+ $(DOCKER_RUN ) bin/ecs
4141
4242.PHONY : fix-cs
4343fix-cs : # # Fix PHP code style
44- $(DOCKER_RUN ) bin/php-cs-fixer fix --config=.php_cs.php
44+ $(DOCKER_RUN ) bin/ecs --fix
4545
4646.PHONY : rector
4747rector : # # Run rector
Original file line number Diff line number Diff line change 3838 "donatj/mock-webserver" : " ^2.0" ,
3939 "http-interop/http-factory-guzzle" : " ^1.0" ,
4040 "php-http/guzzle6-adapter" : " ^2.0" ,
41- "rector/rector" : " ^0.14.6"
41+ "rector/rector" : " ^0.14.6" ,
42+ "symplify/easy-coding-standard" : " ^11.1"
4243 },
4344 "config" : {
4445 "bin-dir" : " bin" ,
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use PhpCsFixer \Fixer \ArrayNotation \ArraySyntaxFixer ;
4+ use Symplify \EasyCodingStandard \Config \ECSConfig ;
5+ use Symplify \EasyCodingStandard \ValueObject \Set \SetList ;
6+ use Symplify \CodingStandard \Fixer \LineLength \LineLengthFixer ;
7+ use Symplify \CodingStandard \Fixer \Spacing \StandaloneLinePromotedPropertyFixer ;
8+
9+ return static function (ECSConfig $ ecsConfig ): void {
10+ $ ecsConfig ->paths ([
11+ __DIR__ . '/src ' ,
12+ __DIR__ . '/tests ' ,
13+ __DIR__ . '/spec '
14+ ]);
15+
16+ $ ecsConfig ->sets ([SetList::PSR_12 ]);
17+
18+ $ ecsConfig ->ruleWithConfiguration (ArraySyntaxFixer::class, [
19+ 'syntax ' => 'short ' ,
20+ ]);
21+
22+ $ ecsConfig ->ruleWithConfiguration (LineLengthFixer::class, [
23+ LineLengthFixer::LINE_LENGTH => 140 ,
24+ LineLengthFixer::INLINE_SHORT_LINES => false ,
25+ LineLengthFixer::BREAK_LONG_LINES => true ,
26+ ]);
27+
28+ $ ecsConfig ->rule (StandaloneLinePromotedPropertyFixer::class);
29+ };
You can’t perform that action at this time.
0 commit comments