Skip to content

Commit ffce097

Browse files
committed
docs: add PHPDoc types
1 parent cc14fdd commit ffce097

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎system/Router/RouteCollection.php‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ public function getRoutes(?string $verb = null): array
527527

528528
/**
529529
* Returns one or all routes options
530+
*
531+
* @return array<string, int|string> [key => value]
530532
*/
531533
public function getRoutesOptions(?string $from = null, ?string $verb = null): array
532534
{
@@ -1149,6 +1151,11 @@ public function getFilterForRoute(string $search, ?string $verb = null): string
11491151
* 'role:admin,manager'
11501152
*
11511153
* has a filter of "role", with parameters of ['admin', 'manager'].
1154+
*
1155+
* @param string $search routeKey
1156+
*
1157+
* @return array<int, string> filter_name or filter_name:arguments like 'role:admin,manager'
1158+
* @phpstan-return list<string>
11521159
*/
11531160
public function getFiltersForRoute(string $search, ?string $verb = null): array
11541161
{
@@ -1520,6 +1527,15 @@ public function resetRoutes()
15201527

15211528
/**
15221529
* Load routes options based on verb
1530+
*
1531+
* @return array<string, array<string, array|int|string>> [routeKey(or from) => [key => value]]
1532+
* @phpstan-return array<
1533+
* string,
1534+
* array{
1535+
* filter?: string|list<string>, namespace?: string, hostname?: string,
1536+
* subdomain?: string, offset?: int, priority?: int
1537+
* }
1538+
* >
15231539
*/
15241540
protected function loadRoutesOptions(?string $verb = null): array
15251541
{

0 commit comments

Comments
 (0)