Skip to content

Commit 10abe57

Browse files
committed
Update LazyInternalScopeFactory.php
1 parent f08c608 commit 10abe57

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Analyser/LazyInternalScopeFactory.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ final class LazyInternalScopeFactory implements InternalScopeFactory
2525
{
2626

2727
/** @var int|array{min: int, max: int}|null */
28-
private readonly int|array|null $phpVersion;
28+
private int|array|null $phpVersion;
2929

30-
private ?Parser $currentSimpleVersionParser = null;
30+
private Parser $currentSimpleVersionParser;
3131

3232
private ?ReflectionProvider $reflectionProvider = null;
3333

@@ -63,6 +63,7 @@ public function __construct(
6363
)
6464
{
6565
$this->phpVersion = $this->container->getParameter('phpVersion');
66+
$this->currentSimpleVersionParser = $this->container->getService('currentPhpVersionSimpleParser');
6667
}
6768

6869
public function create(
@@ -89,8 +90,6 @@ public function create(
8990
$className = FiberScope::class;
9091
}
9192

92-
$this->currentSimpleVersionParser ??= $this->container->getService('currentPhpVersionSimpleParser');
93-
9493
$this->reflectionProvider ??= $this->container->getByType(ReflectionProvider::class);
9594
$this->initializerExprTypeResolver ??= $this->container->getByType(InitializerExprTypeResolver::class);
9695
$this->dynamicReturnTypeExtensionRegistry ??= $this->container->getByType(DynamicReturnTypeExtensionRegistryProvider::class)->getRegistry();

0 commit comments

Comments
 (0)