@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | return $this->dispatcher; |
157 | 157 | } |
158 | 158 | |
159 | - $routeDefinitionCallback = function (RouteCollector $r) { |
|
159 | + $routeDefinitionCallback = function(RouteCollector $r) { |
|
160 | 160 | foreach ($this->getRoutes() as $route) { |
161 | 161 | $r->addRoute($route->getMethod(), $route->getPattern(), $route->getIdentifier()); |
162 | 162 | } |
@@ -176,12 +176,12 @@ discard block |
||
176 | 176 | $uri->getPath() |
177 | 177 | ); |
178 | 178 | |
179 | - $functionHandler = function ($arg) use ($uri, $method) { |
|
179 | + $functionHandler = function($arg) use ($uri, $method) { |
|
180 | 180 | if (method_exists($this, $arg['methodName']) || $this->hasMethod($arg['methodName'])) { |
181 | 181 | return $this->{$arg['methodName']}(...$arg['args']); |
182 | 182 | } else { |
183 | 183 | if ($arg['methodName'] === $this->notFoundFuncName) { |
184 | - throw new BadMethodCallException('Method : '. ((string) $method) . ' ON uri : ' . ((string) $uri) . ' Not Allowed'); |
|
184 | + throw new BadMethodCallException('Method : ' . ((string) $method) . ' ON uri : ' . ((string) $uri) . ' Not Allowed'); |
|
185 | 185 | } elseif ($arg['methodName'] === $this->forbiddenFuncName) { |
186 | 186 | throw new BadMethodCallException(((string) $uri) . ' Not Available'); |
187 | 187 | } else { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | if (!is_string($query) && !method_exists($query, '__toString')) { |
244 | 244 | throw new InvalidArgumentException('Uri query must be a string'); |
245 | 245 | } |
246 | - $query = ltrim((string)$query, '?'); |
|
246 | + $query = ltrim((string) $query, '?'); |
|
247 | 247 | $clone = clone $this; |
248 | 248 | $clone->query = $this->filterQuery($query); |
249 | 249 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | if (!is_string($fragment) && !method_exists($fragment, '__toString')) { |
259 | 259 | throw new InvalidArgumentException('Uri fragment must be a string'); |
260 | 260 | } |
261 | - $fragment = ltrim((string)$fragment, '#'); |
|
261 | + $fragment = ltrim((string) $fragment, '#'); |
|
262 | 262 | $clone = clone $this; |
263 | 263 | $clone->fragment = $this->filterQuery($fragment); |
264 | 264 | |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | { |
344 | 344 | return preg_replace_callback( |
345 | 345 | '/(?:[^a-zA-Z0-9_\-\.~:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/', |
346 | - function ($match) { |
|
346 | + function($match) { |
|
347 | 347 | return rawurlencode($match[0]); |
348 | 348 | }, |
349 | 349 | $path |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | { |
362 | 362 | return preg_replace_callback( |
363 | 363 | '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/', |
364 | - function ($match) { |
|
364 | + function($match) { |
|
365 | 365 | return rawurlencode($match[0]); |
366 | 366 | }, |
367 | 367 | $query |
@@ -319,8 +319,8 @@ discard block |
||
319 | 319 | * Filter allowable port to minimize risk |
320 | 320 | * |
321 | 321 | * @access protected |
322 | - * @param mixed $port |
|
323 | - * @return mixed $port |
|
322 | + * @param integer|null $port |
|
323 | + * @return null|integer $port |
|
324 | 324 | * @throws InvalidArgumentException for incorrect port assigned |
325 | 325 | */ |
326 | 326 | protected function filterPort($port) |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | * |
338 | 338 | * @access protected |
339 | 339 | * @param string $path |
340 | - * @return rawurlencode of cleared path |
|
340 | + * @return string of cleared path |
|
341 | 341 | */ |
342 | 342 | protected function filterPath($path) |
343 | 343 | { |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | * |
356 | 356 | * @access protected |
357 | 357 | * @param string $query |
358 | - * @return rawurlencode of replaced query |
|
358 | + * @return string of replaced query |
|
359 | 359 | */ |
360 | 360 | protected function filterQuery($query) |
361 | 361 | { |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | * get Base Url |
409 | 409 | * |
410 | 410 | * @access public |
411 | - * @return void |
|
411 | + * @return string |
|
412 | 412 | */ |
413 | 413 | public function getBaseUrl() |
414 | 414 | { |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | * |
431 | 431 | * @access public |
432 | 432 | * @static |
433 | - * @return Resilient\Http\Uri |
|
433 | + * @return Uri |
|
434 | 434 | */ |
435 | 435 | public static function createFromServer($serv) |
436 | 436 | { |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | * @access public |
487 | 487 | * @static |
488 | 488 | * @param string $uri |
489 | - * @return Resilient\Http\Uri |
|
489 | + * @return Uri |
|
490 | 490 | */ |
491 | 491 | public static function createFromString(string $uri) |
492 | 492 | { |