Conditions | 5 |
Paths | 6 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
40 | 4 | private function parse($artifacts) |
|
41 | { |
||
42 | // quick validation: requires a list of strings |
||
43 | 4 | if (!is_array($artifacts) || !count($artifacts)) { |
|
44 | 1 | ParseException::__("'artifacts' requires a list"); |
|
45 | } |
||
46 | |||
47 | 3 | foreach ($artifacts as $index => $string) { |
|
48 | 3 | if (!is_string($string)) { |
|
49 | 1 | ParseException::__(sprintf( |
|
50 | 1 | "'artifacts' requires a list of strings, #%d is not a string", |
|
51 | 3 | $index |
|
52 | )); |
||
53 | } |
||
54 | } |
||
55 | |||
56 | 2 | $this->artifacts = $artifacts; |
|
57 | 2 | } |
|
59 |