Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
18 | public function aggregate($healths) |
||
19 | 30 | { |
|
20 | $statusCandidates = []; |
||
21 | 30 | foreach ($healths as $key => $health) { |
|
22 | 30 | $statusCandidates[] = $health->getStatus(); |
|
23 | 30 | } |
|
24 | 30 | $status = $this->aggregateStatus($statusCandidates); |
|
25 | 30 | $details = $this->aggregateDetails($healths); |
|
26 | 30 | $builder = new HealthBuilder($status, $details); |
|
27 | 30 | ||
28 | 30 | return $builder->build(); |
|
29 | } |
||
30 | |||
51 |