Skip to content

Commit 029bfa5

Browse files
committed
PHP 7.4 fix
1 parent 5170195 commit 029bfa5

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
@@ -408,8 +408,8 @@ public function resolveConstantType(string $constantName, Type $constantType): T
408408
if ($constantType->isConstantValue()->yes()) {
409409
if (array_key_exists($constantName, $this->dynamicConstantNames)) {
410410
$phpdocTypes = $this->dynamicConstantNames[$constantName];
411-
$typeStringResolver = $this->container?->getByType(TypeStringResolver::class);
412-
if ($typeStringResolver !== null) {
411+
if ($this->container !== null) {
412+
$typeStringResolver = $this->container->getByType(TypeStringResolver::class);
413413
return $typeStringResolver->resolve($phpdocTypes, new NameScope(null, [], null));
414414
}
415415
}
@@ -431,8 +431,8 @@ public function resolveClassConstantType(string $className, string $constantName
431431

432432
if ($constantType->isConstantValue()->yes()) {
433433
$phpdocTypes = $this->dynamicConstantNames[$lookupConstantName];
434-
$typeStringResolver = $this->container?->getByType(TypeStringResolver::class);
435-
if ($typeStringResolver !== null) {
434+
if ($this->container !== null) {
435+
$typeStringResolver = $this->container->getByType(TypeStringResolver::class);
436436
return $typeStringResolver->resolve($phpdocTypes, new NameScope(null, [], $className));
437437
}
438438
}

0 commit comments

Comments
 (0)