From 00797c74dbe2fa4559115b0ed5cb98979e108d30 Mon Sep 17 00:00:00 2001 From: Jefersson Nathan Date: Fri, 23 Dec 2016 11:39:03 -0300 Subject: [PATCH] use strong comparators --- src/Router.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Router.php b/src/Router.php index 11d44bf..4d68044 100755 --- a/src/Router.php +++ b/src/Router.php @@ -103,12 +103,12 @@ class Router { 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; } $currentDir = dirname($_SERVER['SCRIPT_NAME']); - if ($currentDir != '/') { + if ('/' !== $currentDir) { $requestUrl = str_replace($currentDir, '', $requestUrl); } @@ -126,7 +126,7 @@ class Router $argument_keys = $argument_keys[1]; // check arguments number - if(count($argument_keys) != count($matches)) { + if(count($argument_keys) !== count($matches)) { continue; } -- 2.11.0