@param int $code

@return $this
345358
public function setCode($code, $message)
    {
        $this->message = $message;
        $this->code    = (int)$code;

        return $this;
    }
596043
public function setCode(int $code, string $reasonPhrase = null): self
    {
        $this->code         = $code;
        $this->reasonPhrase = null === $reasonPhrase ? Http::reasonPhraseFor($code) : $reasonPhrase;
        return $this;
    }
901268
public function withStatus($code, $reasonPhrase = null)
    {
        if ($this->complete) {
            return $this;
        }

        $new = $this->psrResponse->withStatus($code, $reasonPhrase);
        return new self($new);
    }
407284
protected function getCode($code)
    {
        if (is_array($code)) {
            return $this->getCodeArray($code);
        }

        return $this->get($code);
    }
270354
public function with(string $name, $value, ?int $code = null)
  {
    $this->with = array_merge([$name => $value], $this->with);

    if ($code != null) {
      $this->code = $code;
      return $this->send();
    }

    return $this;
  }
317356
public function setCode($code)
    {
        if (null !== $code && !in_array(strtoupper($code), self::$availableCurrencies)) {
            throw new \Bitpay\Client\ArgumentException(
                sprintf('The currency code "%s" is not supported.', $code)
            );
        }

        $this->code = strtoupper($code);

        return $this;
    }
844068
private function setStatusHeader($code = 200)
    {
        if (empty(self::$codes[$code])) {
            $code = 200;
        }

        if (!empty($this->response)) {
            $this->response->status($code);
        }

        return $this;
    }
1163523
public function setStatusCode($code)
    {
        $this->headerBag->setStatusCode($code);
        $this->statusCode = $code;

        return $this;
    }
646943
public function setCode($code)
    {
        $allowedValues = $this->getCodeAllowableValues();
        if (!in_array($code, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'code', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['code'] = $code;

        return $this;
    }
535862
public function addStatusCode(int $code, string $value) : self
    {
        if (isset(self::$statusCodeList[$code])) {
            throw new \InvalidArgumentException(sprintf("Already defined status code '%s'", $code));
        }

        self::$statusCodeList[$code] = $value;

        return $this;
    }
367738
public function httpStatus(Int $code = NULL) : Restful
    {
        $code = $code ?? Redirect::status();

        header('HTTP/1.1 ' . $code . ' ' . Http::code($code));

        return $this;
    }
680560
public function setHttpCode($code)
    {
        $this->addHeader(new Header\Header('HTTP/1.1 ' . (int) $code . ' ' . Header\HttpCode::getText($code), true, (int) $code));

        return $this;
    }
193926
public function setCode(int $code)
    {
        $allowed_codes = [
            0,
            1,
            2
        ];

        if (!in_array($code, $allowed_codes)) {
            $code = 1;
        }

        $this->code = $code;
    }
960406
public function assertSourceHas($code)
    {
        PHPUnit::assertTrue(
            Str::contains($this->driver->getPageSource(), $code),
            "Did not find expected source code [{$code}]"
        );

        return $this;
    }
175969
public function setStatusCode($code)
	{
		if (!array_key_exists($code, self::$statusCodeMap)) {
			throw new InvalidArgumentException(sprintf('The HTTP stauts code %s is unknown.', $code));
		}

		$this->statusCode = $code;

		return $this;
	}
1179160
function setCode( $code ) {
        $this->code = $code;
        $this->addHeader($this->getDefaultHeaderFromCode( $code ));
        return $this;
    }
1371718
public function setCode($code)
    {
        if (!is_scalar($code)) {
            throw new InvalidArgumentException(
                sprintf(
                    'Wrong parameters for %s([int|string $code]); %s given.',
                    __METHOD__,
                    is_object($code) ? get_class($code) : gettype($code)
                ),
                E_ERROR
            );
        }

        $this->code = $code;

        return $this;
    }