src/Sherlock/common/Cluster.php
public function addNode($host, $port, $autodetect = true)
    {
        if (!isset($host)) {
            throw new exceptions\BadMethodCallException("A server address must be provided when adding a node.");
        }

        if (!is_numeric($port)) {
            throw new exceptions\InvalidArgumentException("Port argument must be a number");
        }

        $this->nodes[$host] = array('host' => $host, 'port' => $port);
    }
public function addNode($host, $port, $autodetect = true)
    {
        if (!isset($host)) {
            throw new exceptions\BadMethodCallException("A server address must be provided when adding a node.");
        }

        if (!is_numeric($port)) {
            throw new exceptions\InvalidArgumentException("Port argument must be a number");
        }

        $this->nodes[$host] = array('host' => $host, 'port' => $port);
    }
@param  string                              $host
@param  int                                 $port
@param  bool                                $autodetect

@throws exceptions\BadMethodCallException
@throws exceptions\InvalidArgumentException