| Conditions | 4 |
| Paths | 4 |
| Total Lines | 26 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | private function deserializeFile($path) |
||
| 36 | { |
||
| 37 | if (false === is_readable($path)) { |
||
| 38 | return []; |
||
| 39 | } |
||
| 40 | |||
| 41 | $cGroup = file_get_contents($path); |
||
| 42 | $lines = explode(PHP_EOL, $cGroup); |
||
| 43 | |||
| 44 | $result = []; |
||
| 45 | foreach ($lines as $line) { |
||
| 46 | $fields = explode(':', $line); |
||
| 47 | if (3 !== count($fields)) { |
||
| 48 | continue; |
||
| 49 | } |
||
| 50 | |||
| 51 | list($hierarchyId, $controller, $path) = $fields; |
||
| 52 | |||
| 53 | $result[] = new ControlGroup( |
||
| 54 | $hierarchyId, |
||
| 55 | $controller, |
||
| 56 | $path |
||
| 57 | ); |
||
| 58 | } |
||
| 59 | |||
| 60 | return $result; |
||
| 61 | } |
||
| 63 |