src/Url.php
public function setPort($port) {

        if(!is_int($port) || $port < 1 || $port > 65535) {

            throw new UrlException('Invalid port given.');
        }

        $this->port = $port;

        return $this;
    }
public function setPort($port) {

        if(!is_int($port) || $port < 1 || $port > 65535) {

            throw new UrlException('Invalid port given.');
        }

        $this->port = $port;

        return $this;
    }
@param int $port

@return Url
@throws UrlException