*
* @return bool|Route
*/
- public function match($requestUrl, $requestMethod = 'GET')
+ public function match($requestUrl, $requestMethod = RequestMethodInterface::METHOD_GET)
{
+ $currentDir = dirname($_SERVER['SCRIPT_NAME']);
+
foreach ($this->routes->all() as $routes) {
// compare server request method with route's allowed http methods
- if (!in_array($requestMethod, (array)$routes->getMethods())) {
+ if (! in_array($requestMethod, (array)$routes->getMethods(), true)) {
continue;
}