1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Merge pull request #7070 from ricardoboss/issue-6968-php-int-max-isnt-positive

Fix #6968: PHP_INT_MAX isn't positive
This commit is contained in:
orklah 2021-12-05 16:20:26 +01:00 committed by GitHub
commit 09bcdb01ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,13 +164,15 @@ class ConstFetchAnalyzer
case 'PHP_RELEASE_VERSION':
case 'PHP_DEBUG':
case 'PHP_FLOAT_DIG':
case 'PHP_INT_MAX':
case 'PHP_INT_MIN':
case 'PHP_ZTS':
return Type::getInt();
case 'PHP_INT_MAX':
case 'PHP_INT_SIZE':
case 'PHP_MAXPATHLEN':
case 'PHP_VERSION_ID':
case 'PHP_ZTS':
return Type::getInt();
return Type::getPositiveInt();
case 'PHP_FLOAT_EPSILON':
case 'PHP_FLOAT_MAX':