diff --git a/src/Analyser/LazyInternalScopeFactory.php b/src/Analyser/LazyInternalScopeFactory.php index 1d4154261d..9835fb1591 100644 --- a/src/Analyser/LazyInternalScopeFactory.php +++ b/src/Analyser/LazyInternalScopeFactory.php @@ -17,10 +17,14 @@ final class LazyInternalScopeFactory implements InternalScopeFactory { + /** @var int|array{min: int, max: int}|null */ + private int|array|null $phpVersion; + public function __construct( private Container $container, ) { + $this->phpVersion = $this->container->getParameter('phpVersion'); } public function create( @@ -58,7 +62,7 @@ public function create( $context, $this->container->getByType(PhpVersion::class), $this->container->getByType(AttributeReflectionFactory::class), - $this->container->getParameter('phpVersion'), + $this->phpVersion, $declareStrictTypes, $function, $namespace,