diff --git a/src/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php b/src/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php index 0ae448f5e4..9d854027f0 100644 --- a/src/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php +++ b/src/Type/Php/VersionCompareFunctionDynamicReturnTypeExtension.php @@ -120,7 +120,7 @@ public function getTypeFromFunctionCall( } $value = version_compare($version1String->getValue(), $version2String->getValue(), $operatorValue); - $types[$value] = new ConstantBooleanType($value); // @phpstan-ignore offsetAccess.invalidOffset + $types[(int) $value] = new ConstantBooleanType($value); } } else { $value = version_compare($version1String->getValue(), $version2String->getValue());