| Conditions | 3 |
| Paths | 5 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 2 | protected function getAttributes() |
|
| 28 | { |
||
| 29 | 2 | $terminal = null; |
|
| 30 | 2 | if ($this->hasLaravel() === true) { |
|
| 31 | try { |
||
| 32 | 2 | $controller = $this->laravel->make(TerminalController::class); |
|
| 33 | 1 | $response = $this->laravel->call([$controller, 'index'], ['view' => 'panel']); |
|
| 34 | 1 | $terminal = $response->getContent(); |
|
| 35 | 1 | } catch (Exception $e) { |
|
| 36 | 1 | $terminal = $e->getMessage(); |
|
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | return [ |
||
| 41 | 2 | 'terminal' => $terminal, |
|
| 42 | ]; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |