Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
Further minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik Barham committed May 25, 2017
1 parent 692a34c commit fc91180
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fc91180

Please sign in to comment.