Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | 3 | public function parse($name, $length, $string) |
|
40 | { |
||
41 | 3 | if ($length == 0) { |
|
42 | 1 | return []; |
|
43 | } |
||
44 | |||
45 | 3 | $string = trim($string, "\r\n\t,"); |
|
46 | 3 | $array = explode("\r\n\t", $string); |
|
47 | |||
48 | 3 | $parser = $this->parserResolver->resolve($name); |
|
49 | |||
50 | 3 | $entities = []; |
|
51 | 3 | foreach ($array as $item) { |
|
52 | 3 | $entities[] = $parser->parse($item); |
|
53 | 3 | } |
|
54 | |||
55 | 3 | return $entities; |
|
56 | } |
||
68 |