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
6236
6236
6237
6237
public function getPhpVersion (): PhpVersions
6238
6238
{
6239
- $ overallPhpVersionRange = IntegerRangeType::fromInterval (ConstantResolver::PHP_MIN_ANALYZABLE_VERSION_ID , PhpVersionFactory::MAX_PHP_VERSION );
6240
-
6241
6239
$ 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 ) {
6243
6251
return new PhpVersions ($ constType );
6244
6252
}
6245
6253
You can’t perform that action at this time.
0 commit comments