File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ public function handle()
84
84
/**
85
85
* Returns an array containing data of all routes
86
86
*/
87
- public function getRoutes () : array
87
+ public function getRoutes (): array
88
88
{
89
89
90
90
$ app = app ();
@@ -127,9 +127,13 @@ public function getRoutes() : array
127
127
128
128
$ parameters = array_map (function ($ parameterName ) use ($ controllerMethod , $ controllerName ) {
129
129
$ 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
+
133
137
}, $ route ->parameterNames ());
134
138
135
139
if (count ($ parameters ) > 0 ) {
You can’t perform that action at this time.
0 commit comments