It seems like you are loosely comparing @preg_match('/'.$routeMethod.'/', $method) of type integer to the boolean true. If you are specifically checking for non-zero, consider using something more explicit like > 0 or !== 0 instead.
Loading history...
44
$hasMethod = true;
45
}
46
}
47
if(!$hasMethod){
48
throw new \Exception('This route is not released for the accessed method');