Skip to content

Commit 45e3dd5

Browse files
committed
PHP 7.4 fix
1 parent 9767538 commit 45e3dd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Analyser/ConstantResolver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ public function resolveConstantType(string $constantName, Type $constantType): T
412412
if ($constantType->isConstantValue()->yes()) {
413413
if (array_key_exists($constantName, $this->dynamicConstantNames)) {
414414
$phpdocTypes = $this->dynamicConstantNames[$constantName];
415-
$typeStringResolver = $this->container?->getByType(TypeStringResolver::class);
416-
if ($typeStringResolver !== null) {
415+
if ($this->container !== null) {
416+
$typeStringResolver = $this->container->getByType(TypeStringResolver::class);
417417
return $typeStringResolver->resolve($phpdocTypes, new NameScope(null, [], null));
418418
}
419419
}
@@ -435,8 +435,8 @@ public function resolveClassConstantType(string $className, string $constantName
435435

436436
if ($constantType->isConstantValue()->yes()) {
437437
$phpdocTypes = $this->dynamicConstantNames[$lookupConstantName];
438-
$typeStringResolver = $this->container?->getByType(TypeStringResolver::class);
439-
if ($typeStringResolver !== null) {
438+
if ($this->container !== null) {
439+
$typeStringResolver = $this->container->getByType(TypeStringResolver::class);
440440
return $typeStringResolver->resolve($phpdocTypes, new NameScope(null, [], $className));
441441
}
442442
}

0 commit comments

Comments
 (0)