@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function addRoute(Route $route) : Router |
36 | 36 | { |
37 | - $this->rawRoutes[$route->scope()] = $this->rawRoutes[$route->scope()] ?? []; |
|
37 | + $this->rawRoutes[$route->scope()] = $this->rawRoutes[$route->scope()] ? ? []; |
|
38 | 38 | $this->rawRoutes[$route->scope()][] = [$route->method(), $route->pattern(), $route->handler()]; |
39 | 39 | $this->compilationKey = null; |
40 | 40 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | $value = (string) $value; |
76 | 76 | $pieces = explode(':', $matches[1]); |
77 | - if (1 < count($pieces) && 1 !== preg_match('~' . $pieces[1] . '~', $value)) { |
|
77 | + if (1 < count($pieces) && 1 !== preg_match('~'.$pieces[1].'~', $value)) { |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 |