| Conditions | 5 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function unpack(string $content): Data |
||
| 20 | { |
||
| 21 | $lines = explode(static::LINE_SEPARATOR, $content); |
||
| 22 | $libData = new Data(); |
||
| 23 | if (false !== $lines) { |
||
| 24 | foreach ($lines as $line) { |
||
| 25 | if (0 < mb_strlen($line)) { |
||
| 26 | $data = explode(static::DATA_SEPARATOR, $line); |
||
| 27 | if (false !== $data) { |
||
| 28 | list($key, $value, $nothing) = $data; |
||
| 29 | $libData->{$key} = $value; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 | return $libData->clear(); |
||
| 35 | } |
||
| 47 |