original_string: public static function type_integer($var, array $settings)
  	{
  		if (is_array($var) or is_object($var))
  		{
  			throw new InvalidContentType('Array or object could not be converted to integer.');
  		}
  
  		if ((array_key_exists('min', $settings) and $var < intval($settings['min']))
  			or (array_key_exists('max', $settings) and $var > intval($settings['max'])))
  		{
  			throw new InvalidContentType('Integer value outside of range: '.$var);
  		}
  
  		return intval($var);
  	}
code: public static function type_integer($var, array $settings)
  	{
  		if (is_array($var) or is_object($var))
  		{
  			throw new InvalidContentType('Array or object could not be converted to integer.');
  		}
  
  		if ((array_key_exists('min', $settings) and $var < intval($settings['min']))
  			or (array_key_exists('max', $settings) and $var > intval($settings['max'])))
  		{
  			throw new InvalidContentType('Integer value outside of range: '.$var);
  		}
  
  		return intval($var);
  	}
code_tokens: public static function type_integer ( $ var , array $ settings ) { if ( is_array ( $ var ) or is_object ( $ var ) ) { throw new InvalidContentType ( 'Array or object could not be converted to integer.' ) ; } if ( ( array_key_exists ( 'min' , $ settings ) and $ var < intval ( $ settings [ 'min' ] ) ) or ( array_key_exists ( 'max' , $ settings ) and $ var > intval ( $ settings [ 'max' ] ) ) ) { throw new InvalidContentType ( 'Integer value outside of range: ' . $ var ) ; } return intval ( $ var ) ; }
docstring: Casts to int when necessary and checks if within max values
  
  @param   mixed  value to typecast
  @param   array  any options to be passed
  
  @throws  InvalidContentType
  
  @return  int
docstring_tokens: Casts to int when necessary and checks if within max values