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