-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve remaining predefined constants
This resolves the remaining predefined constants that are configured via `dynamicConstantNames` and differ from what reflection is able to resolve.
- Loading branch information
1 parent
d92d616
commit 01a0d58
Showing
12 changed files
with
347 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
use function PHPStan\Testing\assertType; | ||
|
||
// core, https://www.php.net/manual/en/reserved.constants.php | ||
assertType('2147483647', PHP_INT_MAX); | ||
assertType('-2147483648', PHP_INT_MIN); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
use function PHPStan\Testing\assertType; | ||
|
||
// core, https://www.php.net/manual/en/reserved.constants.php | ||
assertType('2147483647|9223372036854775807', PHP_INT_MAX); | ||
assertType('-9223372036854775808|-2147483648', PHP_INT_MIN); |
11 changes: 11 additions & 0 deletions
11
tests/PHPStan/Analyser/data/predefined-constants-php72.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
use function PHPStan\Testing\assertType; | ||
|
||
// core, https://www.php.net/manual/en/reserved.constants.php | ||
assertType('\'BSD\'|\'Darwin\'|\'Linux\'|\'Solaris\'|\'Unknown\'|\'Windows\'', PHP_OS_FAMILY); | ||
assertType('int<1, max>', PHP_FLOAT_DIG); | ||
assertType('float', PHP_FLOAT_EPSILON); | ||
assertType('float', PHP_FLOAT_MIN); | ||
assertType('float', PHP_FLOAT_MAX); | ||
assertType('int<1, max>', PHP_FD_SETSIZE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
use function PHPStan\Testing\assertType; | ||
|
||
// core, https://www.php.net/manual/en/reserved.constants.php | ||
assertType('0', PHP_WINDOWS_EVENT_CTRL_C); | ||
assertType('1', PHP_WINDOWS_EVENT_CTRL_BREAK); |
Oops, something went wrong.