File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ validate:
88 composer validate
99
1010analyze :
11- ./vendor/bin/phpstan analyze --level 3 src tests
11+ ./vendor/bin/phpstan analyze --level 3 src/ tests/
1212
1313lint :
14- composer exec --verbose phpcs -- --standard=PSR12 src bin
14+ composer exec --verbose phpcs -- --standard=PSR12 src/ bin/
1515
1616test :
1717 XDEBUG_MODE=coverage composer exec --verbose vendor/bin/phpunit tests -- --coverage-text
Original file line number Diff line number Diff line change @@ -17,15 +17,21 @@ class Formatters implements CommandFactoryInterface
1717
1818 public function createCommand (string $ commandKey ): CommandInterface
1919 {
20+ $ requestedCommand = null ;
2021 switch ($ commandKey ) {
2122 case self ::FORMAT_KEYS ["stylish " ]:
22- return new StylishCommand ();
23+ $ requestedCommand = new StylishCommand ();
24+ break ;
2325 case self ::FORMAT_KEYS ["plain " ]:
24- return new PlainCommand ();
26+ $ requestedCommand = new PlainCommand ();
27+ break ;
2528 case self ::FORMAT_KEYS ["json " ]:
26- return new JSONCommand ();
29+ $ requestedCommand = new JSONCommand ();
30+ break ;
2731 default :
2832 return throw new DifferException ("input error: unknown output format \n" );
2933 }
34+
35+ return $ requestedCommand ;
3036 }
3137}
You can’t perform that action at this time.
0 commit comments