Skip to content

Commit 90eef16

Browse files
authored
Merge pull request #5630 from paulbalandan/routes-docblocks
Rename docblocks in Routes utilities classes
2 parents 04da50d + ed31c16 commit 90eef16

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

system/Commands/Utilities/Routes/AutoRouteCollector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public function __construct(string $namespace, string $defaultController, string
3535
}
3636

3737
/**
38-
* @return list<list<string>>
38+
* @return array<int, array<int, string>>
39+
* @phpstan-return list<list<string>>
3940
*/
4041
public function get(): array
4142
{

system/Commands/Utilities/Routes/ControllerFinder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public function __construct(string $namespace)
3636
}
3737

3838
/**
39-
* @return class-string[]
39+
* @return string[]
40+
* @phpstan-return class-string[]
4041
*/
4142
public function find(): array
4243
{
@@ -62,7 +63,7 @@ public function find(): array
6263
$classnameOrEmpty = $this->locator->getClassname($file);
6364

6465
if ($classnameOrEmpty !== '') {
65-
/** @var class-string $classname */
66+
/** @phpstan-var class-string $classname */
6667
$classname = $classnameOrEmpty;
6768

6869
$classes[] = $classname;

system/Commands/Utilities/Routes/ControllerMethodReader.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ public function __construct(string $namespace)
3333
}
3434

3535
/**
36-
* @param class-string $class
36+
* @phpstan-param class-string $class
3737
*
38-
* @return list<array{route: string, handler: string}>
38+
* @return array<int, array{route: string, handler: string}>
39+
* @phpstan-return list<array{route: string, handler: string}>
3940
*/
4041
public function read(string $class, string $defaultController = 'Home', string $defaultMethod = 'index'): array
4142
{
@@ -125,7 +126,7 @@ private function hasRemap(ReflectionClass $class): bool
125126
}
126127

127128
/**
128-
* @param class-string $classname
129+
* @phpstan-param class-string $classname
129130
*
130131
* @return string URI path part from the folder(s) and controller
131132
*/

0 commit comments

Comments
 (0)