Conditions | 5 |
Paths | 8 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
28 | 12 | public function run(): bool |
|
29 | { |
||
30 | 12 | if ($this->getArtisanCommnad()->getOutput()->isVerbose()) { |
|
31 | 6 | $this->getArtisanCommnad()->getOutput()->newLine(); |
|
32 | } |
||
33 | |||
34 | 12 | $result = call_user_func($this->function, ...$this->arguments); |
|
35 | |||
36 | 12 | if (! is_bool($result) && $this->getArtisanCommnad()->getOutput()->isVerbose()) { |
|
37 | 6 | $this->getArtisanCommnad()->line('<options=bold>Returned result:</>'); |
|
38 | 6 | $returnResult = var_export($result, true); |
|
39 | 6 | $this->getArtisanCommnad()->line($returnResult); |
|
40 | } |
||
41 | |||
42 | 12 | return is_bool($result) ? $result : true; |
|
43 | } |
||
44 | } |
||
45 |