comparison vendor/symfony/polyfill-php70/Php70.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 1fec387a4317
children 129ea1e6d783
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
58 set_error_handler($handler); 58 set_error_handler($handler);
59 @trigger_error(''); 59 @trigger_error('');
60 restore_error_handler(); 60 restore_error_handler();
61 } 61 }
62 62
63 public static function intArg($value, $caller, $pos) 63 private static function intArg($value, $caller, $pos)
64 { 64 {
65 if (is_int($value)) { 65 if (\is_int($value)) {
66 return $value; 66 return $value;
67 } 67 }
68 if (!is_numeric($value) || PHP_INT_MAX <= ($value += 0) || ~PHP_INT_MAX >= $value) { 68 if (!\is_numeric($value) || PHP_INT_MAX <= ($value += 0) || ~PHP_INT_MAX >= $value) {
69 throw new \TypeError(sprintf('%s() expects parameter %d to be integer, %s given', $caller, $pos, gettype($value))); 69 throw new \TypeError(sprintf('%s() expects parameter %d to be integer, %s given', $caller, $pos, gettype($value)));
70 } 70 }
71 71
72 return (int) $value; 72 return (int) $value;
73 } 73 }