src/Anshar/Http/UriParts/Port.php
public static function isValid($port)
    {
        $port_valid = false;

        if (is_int($port)) {
            $port_valid = self::portIsInValidRange($port);
        } elseif (is_null($port)) {
            $port_valid = true;
        }

        return $port_valid;
    }
public static function isValid($port)
    {
        $port_valid = false;

        if (is_int($port)) {
            $port_valid = self::portIsInValidRange($port);
        } elseif (is_null($port)) {
            $port_valid = true;
        }

        return $port_valid;
    }
public static function isValid ( $ port ) { $ port_valid = false ; if ( is_int ( $ port ) ) { $ port_valid = self :: portIsInValidRange ( $ port ) ; } elseif ( is_null ( $ port ) ) { $ port_valid = true ; } return $ port_valid ; }
Validates a given port. A port is valid if it is either null or an integer between 1 and 65535 inclusive.

@param mixed $port   The port to be validated
@return bool         Returns true if the given port is valid
Returns false otherwise
Validates a given port . A port is valid if it is either null or an integer between 1 and 65535 inclusive .