@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * |
163 | 163 | * @access public |
164 | 164 | * @param Dispatcher $dispatcher |
165 | - * @return void |
|
165 | + * @return Router |
|
166 | 166 | */ |
167 | 167 | public function setDispatcher(Dispatcher $dispatcher) |
168 | 168 | { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * |
177 | 177 | * @access public |
178 | 178 | * @param CacheInterface $cacheEngine |
179 | - * @return void |
|
179 | + * @return Router |
|
180 | 180 | */ |
181 | 181 | public function setCacheEngine(CacheInterface $cacheEngine) |
182 | 182 | { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * |
191 | 191 | * @access public |
192 | 192 | * @param int $cacheTtl |
193 | - * @return void |
|
193 | + * @return Router |
|
194 | 194 | */ |
195 | 195 | public function setCacheTtl(int $cacheTtl) |
196 | 196 | { |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * |
205 | 205 | * @access public |
206 | 206 | * @param string $cacheKey |
207 | - * @return void |
|
207 | + * @return Router |
|
208 | 208 | */ |
209 | 209 | public function setCacheKey(string $cacheKey) |
210 | 210 | { |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * @access public |
242 | 242 | * @param array $method |
243 | 243 | * @param array $routes |
244 | - * @return void |
|
244 | + * @return Router |
|
245 | 245 | */ |
246 | 246 | public function setRoutes(array $method, array $routes) |
247 | 247 | { |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * @param string $method |
299 | 299 | * @param string $pattern |
300 | 300 | * @param mixed $handler |
301 | - * @return new Route |
|
301 | + * @return Route Route |
|
302 | 302 | */ |
303 | 303 | protected function createRoute(string $method, string $pattern, $handler) |
304 | 304 | { |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | * |
423 | 423 | * @access public |
424 | 424 | * @param callable $callable |
425 | - * @return void |
|
425 | + * @return Router |
|
426 | 426 | */ |
427 | 427 | public function whenNotFound(callable $callable) |
428 | 428 | { |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | * |
437 | 437 | * @access public |
438 | 438 | * @param callable $callable |
439 | - * @return void |
|
439 | + * @return Router |
|
440 | 440 | */ |
441 | 441 | public function whenForbidden(callable $callable) |
442 | 442 | { |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | return $this->dispatcher; |
355 | 355 | } |
356 | 356 | |
357 | - $routeDefinitionCallback = function (RouteCollector $r) { |
|
357 | + $routeDefinitionCallback = function(RouteCollector $r) { |
|
358 | 358 | foreach ($this->getRoutes() as $route) { |
359 | 359 | $r->addRoute($route->getMethod(), $route->getPattern(), $route->getIdentifier()); |
360 | 360 | } |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | $uri->getPath() |
383 | 383 | ); |
384 | 384 | |
385 | - $functionHandler = function ($arg) use ($uri, $method) { |
|
385 | + $functionHandler = function($arg) use ($uri, $method) { |
|
386 | 386 | if (method_exists($this, $arg['methodName']) || $this->hasMethod($arg['methodName'])) { |
387 | 387 | return $this->{$arg['methodName']}(...$arg['args']); |
388 | 388 | } else { |