Skip to content

Commit 72f0ba3

Browse files
committed
More specific return type for array/iterables
1 parent c85d366 commit 72f0ba3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/ChainRouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function add(string $name, Route $route, int $priority = 0): void
5353
/**
5454
* Returns all routes in this collection.
5555
*
56-
* @return Route[] An array of routes
56+
* @return array<string, Route> An array of routes
5757
*/
5858
public function all(): array
5959
{

src/LazyRouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function count(): int
3535
/**
3636
* Returns all routes in this collection.
3737
*
38-
* @return Route[] An array of routes
38+
* @return array<string, Route> An array of routes
3939
*/
4040
public function all(): array
4141
{

src/RouteProviderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getRouteByName(string $name): SymfonyRoute;
7777
* @param string[]|null $names The list of names to retrieve, In case of null,
7878
* the provider will determine what routes to return
7979
*
80-
* @return SymfonyRoute[] Iterable list with the keys being the names from the $names array
80+
* @return iterable<string, SymfonyRoute> Iterable list with the keys being the names from the $names array
8181
*/
8282
public function getRoutesByNames(?array $names = null): iterable;
8383
}

0 commit comments

Comments
 (0)