@@ -88,7 +88,9 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | private function compileGroupData() |
| 90 | 90 | { |
| 91 | - if(!is_a($this->group, RouteGroups::class)) return null; |
|
| 91 | + if(!is_a($this->group, RouteGroups::class)) { |
|
| 92 | + return null; |
|
| 93 | + } |
|
| 92 | 94 | |
| 93 | 95 | $this->defaultName = $this->name = $this->group->name; |
| 94 | 96 | $this->defaultNamespace = $this->group->namespace; |
@@ -144,7 +146,9 @@ discard block |
||
| 144 | 146 | */ |
| 145 | 147 | protected function getWhere(String $param): ?String |
| 146 | 148 | { |
| 147 | - if (!isset($this->where[$param])) return null; |
|
| 149 | + if (!isset($this->where[$param])) { |
|
| 150 | + return null; |
|
| 151 | + } |
|
| 148 | 152 | |
| 149 | 153 | return $this->where[$param]; |
| 150 | 154 | } |
@@ -152,7 +152,9 @@ discard block |
||
| 152 | 152 | $routes = $this->routes[$httpMethod]; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - if (!is_array($routes)) return null; |
|
| 155 | + if (!is_array($routes)) { |
|
| 156 | + return null; |
|
| 157 | + } |
|
| 156 | 158 | |
| 157 | 159 | $soughtRoute = null; |
| 158 | 160 | |
@@ -323,7 +325,9 @@ discard block |
||
| 323 | 325 | */ |
| 324 | 326 | protected function getHttpCode(String $slug) |
| 325 | 327 | { |
| 326 | - if (!isset($this->httpCodes[$slug])) return null; |
|
| 328 | + if (!isset($this->httpCodes[$slug])) { |
|
| 329 | + return null; |
|
| 330 | + } |
|
| 327 | 331 | |
| 328 | 332 | return $this->httpCodes[$slug]; |
| 329 | 333 | } |
@@ -353,7 +357,9 @@ discard block |
||
| 353 | 357 | { |
| 354 | 358 | $method = strtoupper($method); |
| 355 | 359 | |
| 356 | - if (!isset($this->routes[$method])) return null; |
|
| 360 | + if (!isset($this->routes[$method])) { |
|
| 361 | + return null; |
|
| 362 | + } |
|
| 357 | 363 | |
| 358 | 364 | return $this->routes[$method]; |
| 359 | 365 | } |
@@ -121,7 +121,9 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | if (!empty($diff)) { |
| 123 | 123 | foreach ($routeParams as $index => $param) { |
| 124 | - if (!isset($diff[$index])) return; |
|
| 124 | + if (!isset($diff[$index])) { |
|
| 125 | + return; |
|
| 126 | + } |
|
| 125 | 127 | |
| 126 | 128 | if ($this->httpMethod != 'GET') { |
| 127 | 129 | $this->params[$param] = rawurldecode($diff[$index]); |
@@ -201,7 +203,9 @@ discard block |
||
| 201 | 203 | }, $except); |
| 202 | 204 | |
| 203 | 205 | foreach ($except as $excession) { |
| 204 | - if (!isset($this->data[$excession])) return; |
|
| 206 | + if (!isset($this->data[$excession])) { |
|
| 207 | + return; |
|
| 208 | + } |
|
| 205 | 209 | |
| 206 | 210 | unset($allWithExcession[$excession]); |
| 207 | 211 | } |
@@ -139,7 +139,9 @@ |
||
| 139 | 139 | protected function instanceMiddleware($middleware) |
| 140 | 140 | { |
| 141 | 141 | if (!preg_match("/\\\/", $middleware)) { |
| 142 | - if (!$middlewareClass = $this->getByAlias($middleware)) return; |
|
| 142 | + if (!$middlewareClass = $this->getByAlias($middleware)) { |
|
| 143 | + return; |
|
| 144 | + } |
|
| 143 | 145 | |
| 144 | 146 | return new $middlewareClass(); |
| 145 | 147 | } |