Skip to content

Commit 372907e

Browse files
committed
[Routing] fixed CS
1 parent 7c0a39c commit 372907e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ private function addMatcher()
5353

5454
foreach ($this->getRoutes()->all() as $name => $route) {
5555
$compiledRoute = $route->compile();
56-
5756
$conditions = array();
58-
5957
$hasTrailingSlash = false;
6058
$matches = false;
6159
if (!count($compiledRoute->getVariables()) && false !== preg_match('#^(.)\^(?P<url>.*?)\$\1#', $compiledRoute->getRegex(), $m)) {
@@ -72,12 +70,10 @@ private function addMatcher()
7270

7371
$regex = $compiledRoute->getRegex();
7472
if ($pos = strpos($regex, '/$')) {
75-
$regex = substr($regex, 0, $pos) . '/?$' . substr($regex, $pos+2);
76-
$conditions[] = sprintf("preg_match('%s', \$pathinfo, \$matches)", $regex);
73+
$regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2);
7774
$hasTrailingSlash = true;
78-
} else {
79-
$conditions[] = sprintf("preg_match('%s', \$pathinfo, \$matches)", $regex);
8075
}
76+
$conditions[] = sprintf("preg_match('%s', \$pathinfo, \$matches)", $regex);
8177

8278
$matches = true;
8379
}
@@ -107,7 +103,7 @@ private function addMatcher()
107103
return array('_controller' => 'Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirectAction', 'url' => \$this->context['base_url'].\$pathinfo.'/', 'permanent' => true, '_route' => '%s');
108104
}
109105
EOF
110-
, $name);
106+
, $name);
111107
}
112108

113109
// optimize parameters array

0 commit comments

Comments
 (0)