mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Check if returnType from docblock is not null (#1658)
This commit is contained in:
@@ -821,7 +821,9 @@ class ModelsCommand extends Command
|
|||||||
) {
|
) {
|
||||||
$matches = [];
|
$matches = [];
|
||||||
$returnType = $this->getReturnTypeFromDocBlock($reflection);
|
$returnType = $this->getReturnTypeFromDocBlock($reflection);
|
||||||
preg_match('/MorphTo<(.+?)(?:,|>)/i', $returnType, $matches);
|
if ($returnType !== null) {
|
||||||
|
preg_match('/MorphTo<(.+?)(?:,|>)/i', $returnType, $matches);
|
||||||
|
}
|
||||||
|
|
||||||
// Model isn't specified because relation is polymorphic
|
// Model isn't specified because relation is polymorphic
|
||||||
$this->setProperty(
|
$this->setProperty(
|
||||||
|
|||||||
Reference in New Issue
Block a user