| Conditions | 5 |
| Paths | 10 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 4 | private function parseServices($services) |
|
| 47 | { |
||
| 48 | 4 | if (!is_array($services)) { |
|
| 49 | 1 | ParseException::__("'services' requires a list of services"); |
|
| 50 | } |
||
| 51 | |||
| 52 | 3 | $reservoir = array(); |
|
| 53 | 3 | foreach ($services as $service) { |
|
| 54 | 2 | if (!is_string($service)) { |
|
| 55 | 1 | ParseException::__("'services' service name string expected"); |
|
| 56 | } |
||
| 57 | |||
| 58 | 2 | '' === ($service = trim($service)) || $reservoir[] = $service; |
|
| 59 | } |
||
| 60 | |||
| 61 | 2 | return $reservoir; |
|
| 62 | } |
||
| 64 |