Skip to content

Commit 8710e09

Browse files
committed
PHP 7.4 fix
1 parent 4c71fb5 commit 8710e09

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
@@ -359,8 +359,8 @@ public function resolveConstantType(string $constantName, Type $constantType): T
359359
if ($constantType->isConstantValue()->yes()) {
360360
if (array_key_exists($constantName, $this->dynamicConstantNames)) {
361361
$phpdocTypes = $this->dynamicConstantNames[$constantName];
362-
$typeStringResolver = $this->container?->getByType(TypeStringResolver::class);
363-
if ($typeStringResolver !== null) {
362+
if ($this->container !== null) {
363+
$typeStringResolver = $this->container->getByType(TypeStringResolver::class);
364364
return $typeStringResolver->resolve($phpdocTypes, new NameScope(null, [], null));
365365
}
366366
}
@@ -382,8 +382,8 @@ public function resolveClassConstantType(string $className, string $constantName
382382

383383
if ($constantType->isConstantValue()->yes()) {
384384
$phpdocTypes = $this->dynamicConstantNames[$lookupConstantName];
385-
$typeStringResolver = $this->container?->getByType(TypeStringResolver::class);
386-
if ($typeStringResolver !== null) {
385+
if ($this->container !== null) {
386+
$typeStringResolver = $this->container->getByType(TypeStringResolver::class);
387387
return $typeStringResolver->resolve($phpdocTypes, new NameScope(null, [], $className));
388388
}
389389
}

0 commit comments

Comments
 (0)