| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function has($route) |
||
| 43 | { |
||
| 44 | $config = $this->config; |
||
| 45 | $routes = explode('.', $route); |
||
| 46 | $endPath = ''; |
||
| 47 | foreach ($routes as $item) { |
||
| 48 | $endPath .= $item . '.'; |
||
| 49 | if (!array_key_exists($item, $config)) { |
||
| 50 | |||
| 51 | return false; |
||
| 52 | } |
||
| 53 | $config = $config[$item]; |
||
| 54 | } |
||
| 55 | |||
| 56 | return true; |
||
| 57 | } |
||
| 58 | } |