Sets the exit code.

@param int $exitCode The command exit code
482487
public function setExitCode($exitCode)
    {
        $this->exitCode = (int) $exitCode;

        $r = new \ReflectionProperty($this->error, 'code');
        $r->setAccessible(true);
        $r->setValue($this->error, $this->exitCode);
    }
596043
public function setCode(int $code, string $reasonPhrase = null): self
    {
        $this->code         = $code;
        $this->reasonPhrase = null === $reasonPhrase ? Http::reasonPhraseFor($code) : $reasonPhrase;
        return $this;
    }
1214714
private function setExitCode(ExecutableTest $test)
    {
        $exit = $test->getExitCode();
        if ($exit > $this->exitcode) {
            $this->exitcode = $exit;
        }
    }
986427
public function setErrorByCode($code)
    {
        if (is_numeric($code)) {
            $code = ShopgateLibraryException::getMessageFor($code);
        }
        $this->setNotValidMessage($code);

        return $this;
    }
425835
protected function setCurrency($code)
    {
        $this->data_currency = array();

        if (!empty($code)) {
            $this->data_currency = $this->currency->get($code);
            if (empty($this->data_currency)) {
                $this->outputHttpStatus(404);
            }
        }
    }
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;
    }
239850
@Override
    public void setBlockedDestinationCode(Integer code) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setBlockedDestinationCode", code);

        updateProperty(JmsInternalConstants.BLOCKED_DESTINATION, code);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setBlockedDestinationCode");
    }
545985
protected function setPostcode(string $postcode): void
    {
        if (! preg_match(self::POSTCODE_FORMAT, $postcode)) {
            throw new InvalidArgumentException('Postcode must match the expected format: ' . self::POSTCODE_FORMAT);
        }

        $this->postcode = $postcode;
    }
630041
def update_exit_code(self, code: int):
        '''
        '''
        if code:
            if self._exit_code:
                self._exit_code = min(self._exit_code, code)
            else:
                self._exit_code = code
1355963
public function setConfirmCode($code)
    {
        if (!$this->confirmCodeAttribute || empty($this->confirmCodeAttribute)) {
            return;
        }
        $confirmCodeAttribute = $this->confirmCodeAttribute;
        $this->$confirmCodeAttribute = $code;
        if (!$this->confirmTimeAttribute) {
            return;
        }
        $confirmTimeAttribute = $this->confirmTimeAttribute;
        if (!empty($code)) {
            $this->$confirmTimeAttribute = date('Y-m-d H:i:s');
            return;
        }
        $this->$confirmTimeAttribute = $this->initConfirmTime;
    }
613787
def handle_command_exit_code(self, code):
        
        ca = self.call_args
        exc_class = get_exc_exit_code_would_raise(code, ca["ok_code"],
                ca["piped"])
        if exc_class:
            exc = exc_class(self.ran, self.process.stdout, self.process.stderr,
                    ca["truncate_exc"])
            raise exc
268412
public function withStatusCode(int $code)
    {
        if ($this->statusCode == $code) {
            return $this;
        }

        $that = clone($this);
        $that->statusCode = $code;
        return $that;
    }
324265
public function setStatus($code, $reasonPhrase = null)
    {
        $this->code = (int) $code;

        if ($reasonPhrase !== null) {
            $this->reasonPhrase = $reasonPhrase;
        } elseif (isset(Http::$codes[$this->code])) {
            $this->reasonPhrase = Http::$codes[$this->code];
        }
    }
62748
public function setStatusHeader($code = 200)
    {
        if (!$this->controller->canEnd()) {
            return;
        }
        $this->response->status($code);
        return $this;
    }
1186625
public function preOutput($code)
    {
        $this->lastLine = $code;
        $this->code = str_repeat("\t", $this->level).$code.PHP_EOL.$this->code;
        ++$this->currentPrints;
    }
952985
public static function SetStatus(int $status, bool $exit = false) :void
        {
            if (!HttpStatusCode::IsSupported($status)) {
                throw new \Error("Status code {$status} is not supported");
            }

            self::$status = $status;
            self::AddHeader('Status', $status);

            if ($exit) {
                self::ApplyHeaders();
                exit();
            }
        }
154088
public function setStatusCode($code)
    {
        $code = (int) $code;

        if (!array_key_exists($code, $this->validStatusCodes)) {
            throw new Exceptions\InvalidStatusCodeException(
                "'$code' is an invalid status code"
            );
        }

        $this->statusCode = $code;

        return $this;
    }