From fc911802d56f171c4e69de56d5b00d3db9264b0c Mon Sep 17 00:00:00 2001 From: Nik Barham Date: Thu, 25 May 2017 15:32:45 +0000 Subject: [PATCH] Further minor cleanup --- src/Router.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Router.php b/src/Router.php index cfaf279..800d358 100644 --- a/src/Router.php +++ b/src/Router.php @@ -100,13 +100,13 @@ public function __construct(array $options = [], $cache = null, LoggerInterface * Define routes using a routerCollector * See https://github.com/nikic/FastRoute for more details * - * @param callable $routeDefinitionCallback Callback that will define the routes + * @param callable $definitionCallback Callback that will define the routes * @return self */ - public function defineRoutes(callable $routeDefinitionCallback) + public function defineRoutes(callable $definitionCallback) { if (!$this->cached) { - $routeDefinitionCallback($this->routeCollection); + $definitionCallback($this->routeCollection); // PSR-16 Cache if ($this->cache instanceof Psr16) { $this->cache->set(static::CACHE_KEY, $this->routeCollection, $this->options['cacheTimeout']); @@ -207,8 +207,7 @@ public function process(Request $request) : Response case Dispatcher::FOUND: $dispatcher = unserialize($dispatch[1]); - $this->log("Router: Route matched: %s@%s", - $dispatcher->controllerClass, $dispatcher->controllerMethod); + $this->log("Router: Route matched: %s@%s", $dispatcher->controllerClass, $dispatcher->controllerMethod); return $dispatcher->startProcessing($this, $request, $dispatch[2]); break; }