| Conditions | 6 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 4 | public function __construct($indicators) |
|
| 49 | { |
||
| 50 | 4 | if (is_string($indicators)) { |
|
| 51 | 1 | $this->statusDetails = new StatusDetails($indicators); |
|
| 52 | 4 | } elseif (is_array($indicators) && !empty($indicators)) { |
|
| 53 | 3 | foreach ($indicators as $key => $indicator) { |
|
| 54 | 3 | if ($key === 0) { |
|
| 55 | 3 | $this->statusDetails = new StatusDetails($indicator); |
|
| 56 | 3 | } else { |
|
| 57 | 1 | $this->otherDetails[] = new StatusDetails($indicator); |
|
| 58 | } |
||
| 59 | 3 | } |
|
| 60 | 3 | } |
|
| 61 | 4 | } |
|
| 62 | } |
||
| 63 |