Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
40 | 1 | public function onInformationFollows(MultiLineResponse $response) |
|
41 | { |
||
42 | 1 | $result = []; |
|
43 | |||
44 | 1 | foreach ($response->getLines() as $line) { |
|
45 | 1 | if (0 == strcasecmp(substr($line, -5, 5), ':full')) { |
|
46 | // ':full' is _not_ included in tag, but value set to true |
||
47 | 1 | $result[str_replace('-', '_', strtolower(substr($line, 0, -5)))] = true; |
|
48 | 1 | } else { |
|
49 | // ':' is _not_ included in tag; value set to false |
||
50 | 1 | $result[str_replace('-', '_', strtolower(substr($line, 0, -1)))] = false; |
|
51 | } |
||
52 | 1 | } |
|
53 | |||
54 | 1 | return $result; |
|
55 | } |
||
56 | } |
||
57 |