Mercurial > hg > isophonics-drupal-site
diff vendor/paragonie/random_compat/lib/cast_to_int.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children |
line wrap: on
line diff
--- a/vendor/paragonie/random_compat/lib/cast_to_int.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/paragonie/random_compat/lib/cast_to_int.php Thu Feb 28 13:21:36 2019 +0000 @@ -27,19 +27,19 @@ */ if (!is_callable('RandomCompat_intval')) { - + /** * Cast to an integer if we can, safely. - * + * * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX) * (non-inclusive), it will sanely cast it to an int. If you it's equal to * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats * lose precision, so the <= and => operators might accidentally let a float * through. - * + * * @param int|float $number The number we want to convert to an int * @param bool $fail_open Set to true to not throw an exception - * + * * @return float|int * @psalm-suppress InvalidReturnType *