src/Assertion.php
public static function ip($value)
    {
        if (!is_string($value) and !filter_var($value, FILTER_VALIDATE_IP)) {
            $message = sprintf('Value "%s" expected to be a valid IP address.', static::stringify($value));

            throw static::createException($value, $message, static::INVALID_IP, null);
        }
    }
public static function ip($value)
    {
        if (!is_string($value) and !filter_var($value, FILTER_VALIDATE_IP)) {
            $message = sprintf('Value "%s" expected to be a valid IP address.', static::stringify($value));

            throw static::createException($value, $message, static::INVALID_IP, null);
        }
    }
public static function ip ( $ value ) { if ( ! is_string ( $ value ) and ! filter_var ( $ value , FILTER_VALIDATE_IP ) ) { $ message = sprintf ( 'Value "%s" expected to be a valid IP address.' , static :: stringify ( $ value ) ) ; throw static :: createException ( $ value , $ message , static :: INVALID_IP , null ) ; } }
Assert that value is a valid IP address

@param mixed $value

@throws Assert\AssertionFailedException
Assert that value is a valid IP address