@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function analyze(Request $request = null) : Response |
| 118 | 118 | { |
| 119 | - $request = $request ?? $this->request; |
|
| 119 | + $request = $request ? ? $this->request; |
|
| 120 | 120 | $response = null; |
| 121 | 121 | |
| 122 | 122 | try { |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if (isset($this->receivers[$eventName])) { |
| 194 | - $event = $event ?? new SimpleEvent(); |
|
| 194 | + $event = $event ? ? new SimpleEvent(); |
|
| 195 | 195 | foreach ($this->buildEventReceivers($eventName) as $receiver) { |
| 196 | 196 | call_user_func_array($this->callback_resolver->resolve($receiver), [$event]); |
| 197 | 197 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | private function buildEventReceivers(string $eventName) |
| 255 | 255 | { |
| 256 | - return $this->computedReceivers[$eventName] = $this->computedReceivers[$eventName] ?? array_merge( |
|
| 256 | + return $this->computedReceivers[$eventName] = $this->computedReceivers[$eventName] ? ? array_merge( |
|
| 257 | 257 | $this->receivers[$eventName][self::RECEIVER_HIGH_PRIORITY], |
| 258 | 258 | $this->receivers[$eventName][self::RECEIVER_NORMAL_PRIORITY], |
| 259 | 259 | $this->receivers[$eventName][self::RECEIVER_LOW_PRIORITY] |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $request = $classname::createFromGlobals(); |
| 45 | - $request->setSession($request->getSession() ?? new Session()); |
|
| 45 | + $request->setSession($request->getSession() ? ? new Session()); |
|
| 46 | 46 | |
| 47 | 47 | return $request; |
| 48 | 48 | }; |
@@ -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 | |