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