| Conditions | 4 |
| Paths | 8 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 4 | public function handle(): void |
|
| 30 | { |
||
| 31 | 4 | $wasUp = $this->porter->isUp(); |
|
| 32 | |||
| 33 | 4 | if ($wasUp) { |
|
| 34 | 1 | $this->call('stop'); |
|
| 35 | } |
||
| 36 | |||
| 37 | 4 | $this->porter->compose(); |
|
| 38 | |||
| 39 | 4 | foreach (Site::all() as $site) { |
|
| 40 | 2 | $site->buildFiles(); |
|
| 41 | } |
||
| 42 | |||
| 43 | // The porter_default certificate is used for serving error pages |
||
| 44 | // when a domain has not been set up in Porter |
||
| 45 | 4 | app(CertificateBuilder::class)->build('porter_default'); |
|
| 46 | |||
| 47 | 4 | if ($wasUp) { |
|
| 48 | 1 | $this->call('start'); |
|
| 49 | } |
||
| 52 |