check for dead-code info

This commit is contained in:
TomasVotruba 2020-02-26 18:29:25 +01:00
parent 7ba752378c
commit 7fd5234a10

View File

@ -84,8 +84,11 @@ final class DoctrineEntityManipulator
return false;
}
/** @var PhpDocInfo $phpDocInfo */
/** @var PhpDocInfo|null $phpDocInfo */
$phpDocInfo = $class->getAttribute(AttributeKey::PHP_DOC_INFO);
if ($phpDocInfo === null) {
return false;
}
// is parent entity
if ($phpDocInfo->hasByType(InheritanceTypeTagValueNode::class)) {