From 49dd558444c3042c1c229d1d11bb95d63adde38c Mon Sep 17 00:00:00 2001 From: Lee McDermott Date: Mon, 13 Jun 2011 02:40:21 +0100 Subject: [PATCH] Couple more CS fixes --- .../Matcher/Dumper/PhpMatcherDumper.php | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index 2c420d9446..0ebadc76b8 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -72,16 +72,16 @@ EOF; private function compileRoutes(RouteCollection $routes, $supportsRedirections, $parentPrefix = null) { $code = array(); - + $routeIterator = $routes->getIterator(); $keys = array_keys($routeIterator->getArrayCopy()); $keysCount = count($keys); - + $i = 0; - + foreach ($routeIterator as $name => $route) { $i++; - + if ($route instanceof RouteCollection) { $prefix = $route->getPrefix(); $optimizable = $prefix && count($route->all()) > 1 && false === strpos($route->getPrefix(), '{'); @@ -91,7 +91,7 @@ EOF; if ($keys[$j] === null) { continue; } - + $testRoute = $routeIterator->offsetGet($keys[$j]); $isCollection = ($testRoute instanceof RouteCollection); @@ -99,23 +99,22 @@ EOF; if (0 === strpos($testPrefix, $prefix)) { $routeIterator->offsetUnset($keys[$j]); - + if ($isCollection) { $route->addCollection($testRoute); - } - else { + } else { $route->add($keys[$j], $testRoute); } - + $i++; $keys[$j] = null; } } - + $code[] = sprintf(" if (0 === strpos(\$pathinfo, '%s')) {", $prefix); $indent = ' '; } - + foreach ($this->compileRoutes($route, $supportsRedirections, $prefix) as $line) { foreach (explode("\n", $line) as $l) { $code[] = $indent.$l;