Conditions | 3 |
Paths | 1 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
19 | 4 | public function build(): Health |
|
20 | { |
||
21 | 4 | $health = new Health(); |
|
22 | |||
23 | $this->registry->getAll()->map(function (HealthContributor $contributor, $name) use ($health) { |
||
24 | 3 | if ($name === 'status') { |
|
25 | 3 | $health->status = $contributor->run(); |
|
26 | |||
27 | 3 | return; |
|
28 | } |
||
29 | 2 | if ($this->detailsAreEnabled()) { |
|
30 | 1 | $health->details[$name] = $contributor->run(); |
|
31 | } |
||
32 | 4 | }); |
|
33 | |||
34 | 4 | return $health; |
|
35 | } |
||
36 | |||
42 |