@@ -69,7 +69,9 @@ discard block |
||
69 | 69 | { |
70 | 70 | $parsedRoute = parse_url($this->fullUrl ?? "/"); |
71 | 71 | |
72 | - if (empty($data)) return $parsedRoute; |
|
72 | + if (empty($data)) { |
|
73 | + return $parsedRoute; |
|
74 | + } |
|
73 | 75 | |
74 | 76 | if (isset($parsedRoute[$data])) { |
75 | 77 | return $parsedRoute[$data]; |
@@ -101,7 +103,9 @@ discard block |
||
101 | 103 | { |
102 | 104 | $path = $this->getParsedRoute(); |
103 | 105 | |
104 | - if (!$path) return null; |
|
106 | + if (!$path) { |
|
107 | + return null; |
|
108 | + } |
|
105 | 109 | |
106 | 110 | return "{$path['scheme']}://{$path['host']}{$this->path()}"; |
107 | 111 | } |
@@ -196,7 +200,9 @@ discard block |
||
196 | 200 | |
197 | 201 | if (!empty($diff)) { |
198 | 202 | foreach ($routeParams as $index => $param) { |
199 | - if (!isset($diff[$index])) return; |
|
203 | + if (!isset($diff[$index])) { |
|
204 | + return; |
|
205 | + } |
|
200 | 206 | |
201 | 207 | if ($this->httpMethod != 'GET') { |
202 | 208 | $this->params[$param] = rawurldecode($diff[$index]); |
@@ -298,7 +304,9 @@ discard block |
||
298 | 304 | }, $except); |
299 | 305 | |
300 | 306 | foreach ($except as $excession) { |
301 | - if (!isset($this->data[$excession])) return; |
|
307 | + if (!isset($this->data[$excession])) { |
|
308 | + return; |
|
309 | + } |
|
302 | 310 | |
303 | 311 | unset($allWithExcession[$excession]); |
304 | 312 | } |
@@ -374,7 +382,9 @@ discard block |
||
374 | 382 | { |
375 | 383 | $authorizationHeader = $this->header('Authorization'); |
376 | 384 | |
377 | - if (!$authorizationHeader) return null; |
|
385 | + if (!$authorizationHeader) { |
|
386 | + return null; |
|
387 | + } |
|
378 | 388 | |
379 | 389 | if (preg_match("/^Bearer\s(.*)+$/", $authorizationHeader, $found)) { |
380 | 390 | return $authorizationHeader; |