Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function handle(): void |
||
32 | { |
||
33 | $status = strtolower(/** @scrutinizer ignore-type */ $this->argument('status')); |
||
34 | |||
35 | if (!in_array($status, ['on', 'off'])) { |
||
36 | throw new \Exception('Xdebug can only be turned on or off.'); |
||
37 | } |
||
38 | |||
39 | if ($status === 'on') { |
||
40 | app(XDebug::class)->turnOn(); |
||
41 | |||
42 | return; |
||
43 | } |
||
44 | |||
45 | app(XDebug::class)->turnOff(); |
||
46 | } |
||
48 |