Skip to content

Commit 9d07008

Browse files
committed
Fix notes per dbu and WoutenJ
1 parent 42508d7 commit 9d07008

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Doctrine/Phpcr/RouteProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public function getRouteCollectionForRequest(Request $request)
7777
$collection->add($key, $route);
7878
}
7979
}
80-
}
8180
} catch (RepositoryException $e) {
8281
// TODO: how to determine whether this is a relevant exception or not?
8382
// https://github.com/symfony-cmf/RoutingBundle/issues/143
@@ -122,7 +121,7 @@ public function getRouteByName($name, $parameters = array())
122121
{
123122

124123
// $name is the route document path
125-
if ( '' === $this->idPrefix || 0 === strpos($name, $this->idPrefix) ) {
124+
if ('' === $this->idPrefix || 0 === strpos($name, $this->idPrefix)) {
126125
$route = $this->getObjectManager()->find($this->className, $name);
127126
}
128127

@@ -153,7 +152,6 @@ public function getRoutesByNames($names, $parameters = array())
153152
$routes = $names;
154153
}
155154

156-
157155
$collection = $this->getObjectManager()->findMany($this->className, $routes);
158156
foreach ($collection as $key => $document) {
159157
if (!$document instanceof SymfonyRoute) {

Tests/Unit/Doctrine/Phpcr/RouteProviderTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public function testGetRouteByNameNoRoute()
118118
$routeProvider = new RouteProvider($this->managerRegistry);
119119
$routeProvider->setManagerName('default');
120120
$routeProvider->setPrefix('/cms/routes/');
121-
122121
$routeProvider->getRouteByName('/cms/routes/test-route');
123122
}
124123

@@ -144,7 +143,6 @@ public function testGetRouteByNameInvalidRoute()
144143
$routeProvider->setPrefix('/cms/routes');
145144

146145
$routeProvider->getRouteByName('invalid_route');
147-
148146
}
149147

150148
public function testGetRouteByNameIdPrefixEmptyString()
@@ -177,7 +175,6 @@ public function testGetRouteByNameIdPrefixEmptyString()
177175

178176
$this->assertInstanceOf('Symfony\Component\Routing\Route', $foundRoute);
179177
$this->assertEquals('/cms/routes/test-route', $foundRoute->getPath());
180-
181178
}
182179

183180

0 commit comments

Comments
 (0)