code; } public function isCode(int $code): bool { return $this->code === $code; } public function getPrevious(): ?Response { return $this->previous; } /** * @throws Github\LogicException */ public function setPrevious(Response $previous = null): static { if ($this->previous) { throw new Github\LogicException('Previous response is already set.'); } $this->previous = $previous; return $this; } }