skip null

This commit is contained in:
TomasVotruba 2020-07-01 22:11:10 +02:00
parent 9901e54edc
commit 5cb1947407

View File

@ -103,8 +103,11 @@ PHP
// Remember when we have already processed this constant recursively
$node->setAttribute(self::HAS_NEW_ACCESS_LEVEL, true);
/** @var string $class */
/** @var string|null $class */
$class = $node->getAttribute(AttributeKey::CLASS_NAME);
if ($class === null) {
return null;
}
// 0. constants declared in interfaces have to be public
if ($this->classLikeParsedNodesFinder->findInterface($class) !== null) {