public function setTimeout($timeout) { if (!is_numeric($timeout)) { throw new InvalidArgumentException('The timeout value must be a number.'); } $this->timeout = $timeout; return $this; }