mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Add static to isBuiltin() check in ide-helper:models (#1541)
* Add `\\static` as check For some reason, the `static` keyword as a return type, does not return `isBuiltin()` === true, so a `\\` is added. We need to manually add it to the built in check. * Update ModelsCommand.php * Add tests * Add CHANGELOG.md entry --------- Co-authored-by: Markus Podar <[email protected]> Co-authored-by: Barry vd. Heuvel <[email protected]>
This commit is contained in:
co-authored by
Markus Podar
Barry vd. Heuvel
parent
f7a3dc8ff2
commit
f5759e2001
@@ -1633,7 +1633,7 @@ class ModelsCommand extends Command
|
||||
protected function getReflectionNamedType(ReflectionNamedType $paramType): string
|
||||
{
|
||||
$parameterName = $paramType->getName();
|
||||
if (!$paramType->isBuiltin()) {
|
||||
if (!$paramType->isBuiltin() && $paramType->getName() !== 'static') {
|
||||
$parameterName = '\\' . $parameterName;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user