public function setPort($port)
    {
        if (preg_match(self::PATTERN_MATCH_PORT, $port) !== 1) {
            throw new \InvalidArgumentException('"' . $port . '" is not valid port number as part of a URI.', 1184071241);
        }

        $this->port = (integer)$port;
    }