Skip to content

Commit

Permalink
Merge pull request #37 from MrPunyapal/3.x
Browse files Browse the repository at this point in the history
chore: taking version from phpstan-src if it returns null.
  • Loading branch information
owenvoke authored Dec 28, 2024
2 parents 2d2d574 + 8f55f74 commit 0a1bddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PHPStanAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function make(Container $container, array $rules, array $collector

$scopeFactory = TestCaseForTypeCoverage::createScopeFactory($reflectionProvider, $typeSpecifier); // @phpstan-ignore-line

$version = InstalledVersions::getPrettyVersion('phpstan/phpstan');
$version = InstalledVersions::getPrettyVersion('phpstan/phpstan') ?? InstalledVersions::getPrettyVersion('phpstan/phpstan-src');
if ($version !== null && mb_strpos($version, '2.') === 0) {
$nodeScopeResolver = new NodeScopeResolver( // @phpstan-ignore-line
$reflectionProvider,
Expand Down

0 comments on commit 0a1bddf

Please sign in to comment.