We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a3710e commit 4d47c6eCopy full SHA for 4d47c6e
src/ModelFinder.php
@@ -57,6 +57,10 @@ protected function getFullyQualifiedClassNameFromFile(string $path): string
57
return $statement instanceof Namespace_;
58
})->first();
59
60
+ if (! $root_statement) {
61
+ return '';
62
+ }
63
+
64
return collect($root_statement->stmts)
65
->filter(function ($statement) {
66
return $statement instanceof Class_;
@@ -66,5 +70,4 @@ protected function getFullyQualifiedClassNameFromFile(string $path): string
70
})
67
71
->first() ?? '';
68
72
}
69
-
73
0 commit comments