Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
minor #1215 Remove duplicate call to add collection (CarsonF)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.3 branch.

Discussion
----------

Remove duplicate call to add collection

`doFlush` returns the same `RouteCollection` instance now, so there's no need to add the sub-collection routes to itself.

Commits
-------

8518a8e doFlush returns the same RouteCollection instance now, so there's no need to add the sub-collection routes to itself
  • Loading branch information
fabpot committed Aug 23, 2015
2 parents ab6aabb + 8518a8e commit 7facddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Silex/ControllerCollection.php
Expand Up @@ -210,7 +210,7 @@ private function doFlush($prefix, RouteCollection $routes)
$routes->add($name, $controller->getRoute());
$controller->freeze();
} else {
$routes->addCollection($controller->doFlush($prefix.$controller->prefix, $routes));
$controller->doFlush($prefix.$controller->prefix, $routes);
}
}

Expand Down

0 comments on commit 7facddb

Please sign in to comment.