src/Storage/Configurator/AbstractConfigurator.php
public function assertInteger($config, $key, $lowest = null, $highest = null)
    {
        if (array_key_exists($key, $config)) {
            if (!is_int($config[$key])) {
                throw new ConfigurationException($key." must be an integer.");
            }
            if ($lowest !== null && $config[$key] < $lowest) {
                throw new ConfigurationException($key." cannot be lower than ".$lowest);
            }
            if ($highest !== null && $config[$key] > $highest) {
                throw new ConfigurationException($key." cannot be higher than ".$highest);
            }
        }
        return $this;
    }
public function assertInteger($config, $key, $lowest = null, $highest = null)
    {
        if (array_key_exists($key, $config)) {
            if (!is_int($config[$key])) {
                throw new ConfigurationException($key." must be an integer.");
            }
            if ($lowest !== null && $config[$key] < $lowest) {
                throw new ConfigurationException($key." cannot be lower than ".$lowest);
            }
            if ($highest !== null && $config[$key] > $highest) {
                throw new ConfigurationException($key." cannot be higher than ".$highest);
            }
        }
        return $this;
    }
public function assertInteger ( $ config , $ key , $ lowest = null , $ highest = null ) { if ( array_key_exists ( $ key , $ config ) ) { if ( ! is_int ( $ config [ $ key ] ) ) { throw new ConfigurationException ( $ key . " must be an integer." ) ; } if ( $ lowest !== null && $ config [ $ key ] < $ lowest ) { throw new ConfigurationException ( $ key . " cannot be lower than " . $ lowest ) ; } if ( $ highest !== null && $ config [ $ key ] > $ highest ) { throw new ConfigurationException ( $ key . " cannot be higher than " . $ highest ) ; } } return $ this ; }
Assert the property is integer or is not set
@param array $config Array being validated
@param string|int $key Inspected array key
@param int $lowest The lowest accepted values
@param int $highest The highest accepted value
@return $this
@throws ConfigurationException On a failed assertation
Assert the property is integer or is not set