code = (int) $code; parent::__construct($headers, $content); } /** * HTTP code. * @return int */ public function getCode() { return $this->code; } /** * @param int * @return bool */ public function isCode($code) { return $this->code === (int) $code; } /** * @return Response|NULL */ public function getPrevious() { return $this->previous; } /** * @return self * * @throws Github\LogicException */ public function setPrevious(Response $previous = NULL) { if ($this->previous) { throw new Github\LogicException('Previous response is already set.'); } $this->previous = $previous; return $this; } }