| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function resolvePath($path, $jsonData, $root) |
||
| 17 | { |
||
| 18 | $file = trim(str_replace($root, '', $path), '/'); |
||
| 19 | |||
| 20 | $jsonData = $this->validateJsonData($path, $jsonData, $root); |
||
| 21 | |||
| 22 | $data = json_decode($jsonData, true); |
||
| 23 | |||
| 24 | if (array_key_exists($file, $data)) { |
||
| 25 | return '/'.$root.'/'.$data[$file]; |
||
| 26 | } |
||
| 27 | |||
| 28 | return elixir($path); |
||
| 29 | } |
||
| 30 | |||
| 53 |