| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 4 | public function handle(): void |
|
| 30 | { |
||
| 31 | 4 | if ($this->option('restore')) { |
|
| 32 | 2 | $this->porterLibrary->getMechanic()->removeAlternativeLoopbackAddress(); |
|
| 33 | 2 | app(Config::class)->updateIp($this->porterLibrary->getMechanic()->getStandardLoopback()); |
|
| 34 | 2 | $this->porter->restart('dns'); |
|
| 35 | |||
| 36 | 2 | return; |
|
| 37 | } |
||
| 38 | |||
| 39 | 2 | $this->porterLibrary->getMechanic()->addAlternativeLoopbackAddress(); |
|
| 40 | 2 | app(Config::class)->updateIp($this->porterLibrary->getMechanic()->getAlternativeLoopback()); |
|
| 41 | 2 | $this->porter->restart('dns'); |
|
| 42 | } |
||
| 44 |