src/Server/Configuration/ServerConfiguration.php
public function setPort($port)
    {
        if (!is_int($port) || $port < 0 || $port > 65535) {
            throw new InvalidArgumentException(
                sprintf('%s only accepts a port between 0 and 65535 inclusive', __FUNCTION__)
            );
        }

        $this->port = $port;

        return $this;
    }
public function setPort($port)
    {
        if (!is_int($port) || $port < 0 || $port > 65535) {
            throw new InvalidArgumentException(
                sprintf('%s only accepts a port between 0 and 65535 inclusive', __FUNCTION__)
            );
        }

        $this->port = $port;

        return $this;
    }
public function setPort ( $ port ) { if ( ! is_int ( $ port ) || $ port < 0 || $ port > 65535 ) { throw new InvalidArgumentException ( sprintf ( '%s only accepts a port between 0 and 65535 inclusive' , __FUNCTION__ ) ) ; } $ this -> port = $ port ; return $ this ; }
Set the port to connect to.

@param int $port
@return static
@throws InvalidArgumentException
Set the port to connect to .