private static function checkArgs_checkArray($num, array $type, $arg, $iate) { $iate += 1; $types = array('greater than', 'less than', 'equal to'); if (!in_array($type[0], $types)) { throw new Iate($i, 'an existing type', $type[0], 1); } if ($type[0] === 'greater than' && Misc::isInt($type[1])) { if ($arg <= $type[1]) { throw new Iate($num, "greater than {$type[1]}", $arg, $iate); } } else { if ($type[0] === 'less than' && Misc::isInt($type[1])) { if ($arg >= $type[1]) { throw new Iate($num, "less than {$type[1]}", $arg, $iate); } } else { if ($type[0] === 'equal to' && $type[1] != $arg) { throw new Iate($num, "equal to {$type[1]}", $arg, $iate); } } } }