| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function handle() |
||
| 31 | { |
||
| 32 | $outputBuffer = new BufferedOutput(); |
||
| 33 | |||
| 34 | $this->runCommand('route:list', [], $outputBuffer); |
||
| 35 | |||
| 36 | $output = $outputBuffer->fetch(); |
||
| 37 | |||
| 38 | $className = CheckForPartialMaintenanceMode::class; |
||
| 39 | |||
| 40 | preg_match_all('/'.preg_quote($className).':(.*[a-z])/', $output, $matches); |
||
| 41 | |||
| 42 | $parts = collect($matches[0])->unique()->map(function ($part) use ($className) { |
||
| 43 | return [str_replace($className.':', '', $part)]; |
||
| 44 | }); |
||
| 45 | |||
| 46 | if ($parts->count() === 0) { |
||
| 47 | $this->error('No parts found!'); |
||
| 48 | } else { |
||
| 49 | $headers = ['Parts in use']; |
||
| 50 | $this->table($headers, $parts->toArray()); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |