Beispiel #1
0
 public static function checkInt($i, $name)
 {
     if (!Check::isInt($i)) {
         throw new \InvalidArgumentException('\'' . $name . '\' must be an integer number but was \'' . var_export($i, true) . '\'');
     }
 }
Beispiel #2
0
 public static function isIntRange($i, $min = PHP_INT_MIN, $max = PHP_INT_MAX)
 {
     return Check::isInt($i) && $i >= $min && $i <= $max;
 }