Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | 5 | private function parse(array $artifacts) |
|
55 | { |
||
56 | // quick validation: requires a list of strings |
||
57 | 5 | if (!count($artifacts)) { |
|
58 | 1 | throw new ParseException("'artifacts' requires a list"); |
|
59 | } |
||
60 | |||
61 | 4 | foreach ($artifacts as $index => $string) { |
|
62 | 4 | if (!is_string($string)) { |
|
63 | 1 | throw new ParseException(sprintf( |
|
64 | 1 | "'artifacts' requires a list of strings, #%d is not a string", |
|
65 | $index |
||
66 | )); |
||
67 | } |
||
68 | } |
||
69 | |||
70 | 3 | $this->artifacts = $artifacts; |
|
71 | 3 | } |
|
73 |