Skip to content

Commit 9494345

Browse files
committed
update
1 parent 6835391 commit 9494345

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Commands/GetRouteSummary.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function handle()
8484
/**
8585
* Returns an array containing data of all routes
8686
*/
87-
public function getRoutes() : array
87+
public function getRoutes(): array
8888
{
8989

9090
$app = app();
@@ -127,9 +127,13 @@ public function getRoutes() : array
127127

128128
$parameters = array_map(function ($parameterName) use ($controllerMethod, $controllerName) {
129129
$p = new ReflectionParameter([$controllerName, $controllerMethod], $parameterName);
130-
return [
131-
$parameterName => $p->getType()->getName()
132-
];
130+
131+
if (is_null($p->getType())) {
132+
return [$parameterName => 'UNKNOWN'];
133+
} else {
134+
return [$parameterName => $p->getType()->getName()];
135+
}
136+
133137
}, $route->parameterNames());
134138

135139
if (count($parameters) > 0) {

0 commit comments

Comments
 (0)