@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | self::getInstance()->checkMethod($route, $requestMethod); |
71 | 71 | self::getInstance()->checkData($route, (new Uri($_SERVER['REQUEST_URI']))->getPath()); |
72 | 72 | return self::getInstance(); |
73 | - }catch(\Exception $er){ |
|
73 | + } catch(\Exception $er){ |
|
74 | 74 | continue; |
75 | 75 | } |
76 | 76 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | try{ |
98 | 98 | $action = unserialize(self::getInstance()->current()['action']); |
99 | 99 | self::getInstance()->executeRouteAction( (is_string($action)) ? $action : $action->getClosure() ); |
100 | - }catch(\Exception $er){ |
|
100 | + } catch(\Exception $er){ |
|
101 | 101 | self::getInstance()->error = $er; |
102 | 102 | } |
103 | 103 |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | $routes[$index] = [ |
72 | - 'uri' => serialize(new Uri(self::getInstance()->getHost().self::getInstance()->getPrefix().$uri)), |
|
73 | - 'action' => (is_callable($closure)) ? serialize(new SerializableClosure($closure)) : serialize($closure), |
|
74 | - 'method' => strtoupper($method), |
|
72 | + 'uri' => serialize(new Uri(self::getInstance()->getHost().self::getInstance()->getPrefix().$uri)), |
|
73 | + 'action' => (is_callable($closure)) ? serialize(new SerializableClosure($closure)) : serialize($closure), |
|
74 | + 'method' => strtoupper($method), |
|
75 | 75 | 'middlewares' => [], |
76 | 76 | 'where' => [], |
77 | 77 | 'before' => [], |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | private static function checkDuplicity(string $uri, string $method): void |
90 | 90 | { |
91 | 91 | foreach(self::getInstance()->getRoutes() as $route){ |
92 | - if( md5($route['uri'].$route['method']) === md5($uri.$method) ){ |
|
92 | + if( md5($route['uri'].$route['method']) === md5($uri.$method) ){ |
|
93 | 93 | throw new \RuntimeException("There is already a route with the URI {$uri} and with the {$method} METHOD configured."); |
94 | 94 | } |
95 | 95 | } |