Skip to content

Commit

Permalink
Merge pull request #36 from MrPunyapal/3.x
Browse files Browse the repository at this point in the history
patch: tests
  • Loading branch information
owenvoke authored Dec 27, 2024
2 parents 254aa8c + ce132b6 commit 2d2d574
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PHPStanAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public static function make(Container $container, array $rules, array $collector
$scopeFactory = TestCaseForTypeCoverage::createScopeFactory($reflectionProvider, $typeSpecifier); // @phpstan-ignore-line

$version = InstalledVersions::getPrettyVersion('phpstan/phpstan');
if (mb_strpos($version, '2.') === 0) {
$nodeScopeResolver = new NodeScopeResolver(
if ($version !== null && mb_strpos($version, '2.') === 0) {
$nodeScopeResolver = new NodeScopeResolver( // @phpstan-ignore-line
$reflectionProvider,
$container->getByType(InitializerExprTypeResolver::class),
$container->getService('betterReflectionReflector'), // @phpstan-ignore-line
Expand All @@ -74,10 +74,10 @@ public static function make(Container $container, array $rules, array $collector
$scopeFactory,
false,
true,
true,
[],
true, // @phpstan-ignore-line
[],
[],
[], // @phpstan-ignore-line
true,
true,
);
Expand Down

0 comments on commit 2d2d574

Please sign in to comment.