Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Lines | 19 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
20 | public function handle(ErrorPrinter $errorPrinter) |
||
21 | { |
||
22 | $errorPrinter->printer = $this->output; |
||
23 | |||
24 | $this->info('Psr-12 is on the table...'); |
||
25 | $this->warn('This command is going to make changes to your files!'); |
||
26 | |||
27 | if (! $this->output->confirm('Do you have committed everything in git?', true)) { |
||
28 | return; |
||
29 | } |
||
30 | |||
31 | ActionsComments::$command = $this; |
||
32 | |||
33 | Psr4Classes::check([CurlyBraces::class]); |
||
34 | |||
35 | $this->finishCommand($errorPrinter); |
||
36 | |||
37 | return $errorPrinter->hasErrors() ? 1 : 0; |
||
38 | } |
||
39 | } |
||
40 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.