Skip to content

Commit 601edfc

Browse files
committed
some phpdoc improvements
1 parent 84dfbd3 commit 601edfc

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

RouteProviderInterface.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface RouteProviderInterface
3838
public function getRouteCollectionForRequest(Request $request);
3939

4040
/**
41-
* Find the route using the provided route name (and parameters)
41+
* Find the route using the provided route name.
4242
*
4343
* @param string $name the route name to fetch
4444
* @param array $parameters DEPRECATED the parameters as they are passed
@@ -52,14 +52,15 @@ public function getRouteCollectionForRequest(Request $request);
5252
public function getRouteByName($name, $parameters = array());
5353

5454
/**
55-
* Find many routes by their names using the provided list of names
55+
* Find many routes by their names using the provided list of names.
5656
*
5757
* Note that this method may not throw an exception if some of the routes
58-
* are not found. It will just return the list of those routes it found.
58+
* are not found or are not actually Route instances. It will just return the
59+
* list of those Route instances it found.
5960
*
6061
* This method exists in order to allow performance optimizations. The
6162
* simple implementation could be to just repeatedly call
62-
* $this->getRouteByName()
63+
* $this->getRouteByName() while catching and ignoring eventual exceptions.
6364
*
6465
* @param array $names the list of names to retrieve
6566
* @param array $parameters DEPRECATED the parameters as they are passed to

Tests/Routing/ContentAwareGeneratorTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,18 @@ public function testGenerateDocumentMultilangLocaleNomatch()
276276
}
277277

278278
/**
279+
* Generate without any information.
280+
*
279281
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
280282
*/
281283
public function testGenerateNoContent()
282284
{
283285
$this->generator->generate('', array());
284286
}
287+
285288
/**
289+
* Generate with an object that is neither a route nor route aware.
290+
*
286291
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
287292
*/
288293
public function testGenerateInvalidContent()
@@ -291,6 +296,8 @@ public function testGenerateInvalidContent()
291296
}
292297

293298
/**
299+
* Generate with a content_id but there is no content repository.
300+
*
294301
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
295302
*/
296303
public function testGenerateNoContentRepository()
@@ -303,6 +310,8 @@ public function testGenerateNoContentRepository()
303310
}
304311

305312
/**
313+
* Generate with content_id but the content is not found.
314+
*
306315
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
307316
*/
308317
public function testGenerateNoContentFoundInRepository()
@@ -323,6 +332,8 @@ public function testGenerateNoContentFoundInRepository()
323332
}
324333

325334
/**
335+
* Generate with content_id but the object at id is not route aware.
336+
*
326337
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
327338
*/
328339
public function testGenerateWrongContentClassInRepository()
@@ -343,6 +354,8 @@ public function testGenerateWrongContentClassInRepository()
343354
}
344355

345356
/**
357+
* Generate from a content that has no routes associated.
358+
*
346359
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
347360
*/
348361
public function testGenerateNoRoutes()
@@ -354,6 +367,8 @@ public function testGenerateNoRoutes()
354367
$this->generator->generate($this->contentDocument);
355368
}
356369
/**
370+
* Generate from a content that returns something that is not a route as route.
371+
*
357372
* @expectedException \Symfony\Component\Routing\Exception\RouteNotFoundException
358373
*/
359374
public function testGenerateInvalidRoute()

0 commit comments

Comments
 (0)