comparison vendor/paragonie/random_compat/lib/random_int.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children c2387f117808
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
76 'Minimum value must be less than or equal to the maximum value' 76 'Minimum value must be less than or equal to the maximum value'
77 ); 77 );
78 } 78 }
79 79
80 if ($max === $min) { 80 if ($max === $min) {
81 return $min; 81 return (int) $min;
82 } 82 }
83 83
84 /** 84 /**
85 * Initialize variables to 0 85 * Initialize variables to 0
86 * 86 *
183 * ... or smaller than $min, 183 * ... or smaller than $min,
184 * then try again. 184 * then try again.
185 */ 185 */
186 } while (!is_int($val) || $val > $max || $val < $min); 186 } while (!is_int($val) || $val > $max || $val < $min);
187 187
188 return (int)$val; 188 return (int) $val;
189 } 189 }
190 } 190 }