Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 1 | private static function extractAttributes($line) |
|
19 | { |
||
20 | 1 | $attrsText = self::extractValue($line); |
|
21 | |||
22 | 1 | $attrs = explode(',', $attrsText); |
|
23 | |||
24 | 1 | $attributes = []; |
|
25 | 1 | foreach ($attrs as $attr) { |
|
26 | 1 | list($key, $value) = explode('=', $attr); |
|
27 | 1 | $attributes[$key] = trim($value); |
|
28 | 1 | } |
|
29 | |||
30 | 1 | return $attributes; |
|
31 | } |
||
32 | } |
||
33 |