| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | abstract class Command extends IlluminateCommand |
||
| 9 | { |
||
| 10 | protected $exitCode = 0; |
||
| 11 | |||
| 12 | 5 | public function __call($method, $parameters) |
|
| 13 | { |
||
| 14 | 5 | if (Str::startsWith($method, 'display')) { |
|
| 15 | 5 | $method = Str::camel(Str::after($method, 'display')); |
|
| 16 | |||
| 17 | 5 | if ($method === 'error') { |
|
| 18 | 3 | $this->exitCode = 1; |
|
| 19 | } |
||
| 20 | |||
| 21 | 5 | call_user_func_array([$this, $method], $parameters); |
|
| 22 | } |
||
| 23 | 5 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Executes the console command. |
||
| 27 | */ |
||
| 28 | 6 | public function handle() |
|
| 31 | } |
||
| 32 | } |
||
| 33 |