| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | protected function getHostsWithChecks(): array |
||
| 24 | { |
||
| 25 | return HostRepository::all() |
||
| 26 | ->map(function (Host $host) { |
||
| 27 | return array_filter([ |
||
| 28 | 'name' => $host->name, |
||
| 29 | 'ssh_user' => $host->ssh_user, |
||
| 30 | 'port' => $host->port, |
||
| 31 | 'ip' => $host->ip, |
||
| 32 | 'checks' => $host->checks |
||
| 33 | ->map( |
||
| 34 | function (Check $check) { |
||
| 35 | return $check->type; |
||
| 36 | }) |
||
| 37 | ->toArray(), |
||
| 38 | ]); |
||
| 39 | }) |
||
| 40 | ->toArray(); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |