File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6236,10 +6236,18 @@ public function getIterableValueType(Type $iteratee): Type
62366236
62376237 public function getPhpVersion (): PhpVersions
62386238 {
6239- $ overallPhpVersionRange = IntegerRangeType::fromInterval (ConstantResolver::PHP_MIN_ANALYZABLE_VERSION_ID , PhpVersionFactory::MAX_PHP_VERSION );
6240-
62416239 $ constType = $ this ->getGlobalConstantType (new Name ('PHP_VERSION_ID ' ));
6242- if ($ constType !== null && !$ constType ->equals ($ overallPhpVersionRange )) {
6240+
6241+ $ isOverallPhpVersionRange = false ;
6242+ if (
6243+ $ constType instanceof IntegerRangeType
6244+ && $ constType ->getMin () === ConstantResolver::PHP_MIN_ANALYZABLE_VERSION_ID
6245+ && ($ constType ->getMax () === null || $ constType ->getMax () === PhpVersionFactory::MAX_PHP_VERSION )
6246+ ) {
6247+ $ isOverallPhpVersionRange = true ;
6248+ }
6249+
6250+ if ($ constType !== null && !$ isOverallPhpVersionRange ) {
62436251 return new PhpVersions ($ constType );
62446252 }
62456253
You can’t perform that action at this time.
0 commit comments