src/mako/validator/rules/IP.php
protected function getFlags(): ?int
	{
		if($this->version === null)
		{
			return null;
		}

		switch($this->version)
		{
			case 'v4':
				return FILTER_FLAG_IPV4;
			case 'v6':
				return FILTER_FLAG_IPV6;
			default:
				throw new RuntimeException(vsprintf('Invalid IP version [ %s ]. The accepted versions are v4 and v6.', [$this->version]));
		}
	}
protected function getFlags(): ?int
	{
		if($this->version === null)
		{
			return null;
		}

		switch($this->version)
		{
			case 'v4':
				return FILTER_FLAG_IPV4;
			case 'v6':
				return FILTER_FLAG_IPV6;
			default:
				throw new RuntimeException(vsprintf('Invalid IP version [ %s ]. The accepted versions are v4 and v6.', [$this->version]));
		}
	}
protected function getFlags ( ) : ? int { if ( $ this -> version === null ) { return null ; } switch ( $ this -> version ) { case 'v4' : return FILTER_FLAG_IPV4 ; case 'v6' : return FILTER_FLAG_IPV6 ; default : throw new RuntimeException ( vsprintf ( 'Invalid IP version [ %s ]. The accepted versions are v4 and v6.' , [ $ this -> version ] ) ) ; } }
Returns the filter flags.

@throws \RuntimeException
@return int|null
Returns the filter flags .