| Conditions | 5 |
| Paths | 6 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | protected function checkMethod(array $route, $method): void |
||
| 42 | { |
||
| 43 | $hasMethod = false; |
||
| 44 | foreach(explode('|',$route['method']) as $routeMethod){ |
||
| 45 | if(@preg_match("/{$routeMethod}/",$method) !== 0 || $method === '*'){ |
||
| 46 | $hasMethod = true; |
||
| 47 | } |
||
| 48 | } |
||
| 49 | if(!$hasMethod){ |
||
| 50 | throw new \Exception('This route is not released for the accessed method'); |
||
| 51 | } |
||
| 56 |