1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

abs should always return a positive integer

This commit is contained in:
marcosh 2021-12-07 11:52:13 +01:00
parent 2530b33dbd
commit 07224e7d31

View File

@ -423,7 +423,7 @@ function gettimeofday(bool $as_float = false) {}
* @psalm-pure
*
* @param numeric $num
* @return ($num is int ? int : ($num is float ? float : int|float))
* @return ($num is int ? positive-int|0 : ($num is float ? float : positive-int|0|float))
*/
function abs($num) {}