Skip to content

Commit aedf2a8

Browse files
committed
Add generic types to traversable implementations
1 parent d172472 commit aedf2a8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Loader/AnnotationClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ abstract protected function configureRoute(Route $route, \ReflectionClass $class
367367
/**
368368
* @param \ReflectionClass|\ReflectionMethod $reflection
369369
*
370-
* @return iterable|RouteAnnotation[]
370+
* @return iterable<int, RouteAnnotation>
371371
*/
372372
private function getAnnotations(object $reflection): iterable
373373
{

RouteCollection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
*
2323
* @author Fabien Potencier <[email protected]>
2424
* @author Tobias Schultze <http://tobion.de>
25+
*
26+
* @implements \IteratorAggregate<string, Route>
2527
*/
2628
class RouteCollection implements \IteratorAggregate, \Countable
2729
{
@@ -94,7 +96,7 @@ public function add(string $name, Route $route/*, int $priority = 0*/)
9496
/**
9597
* Returns all routes in this collection.
9698
*
97-
* @return Route[]
99+
* @return array<string, Route>
98100
*/
99101
public function all()
100102
{

0 commit comments

Comments
 (0)