public function setResponseCode(int $code)
    {
        if ($code < 100 || $code > 599)
        {
            $err = new \InvalidArgumentException("Attempting to set status code to $code");
            self::$logger->critical("Invalid status {0}: {1}", [$code, $err]);
            $this->response_code = 500;
        }
        else
        {
            $this->response_code = $code;
        }
        return $this;
    }
public function setResponseCode(int $code)
    {
        if ($code < 100 || $code > 599)
        {
            $err = new \InvalidArgumentException("Attempting to set status code to $code");
            self::$logger->critical("Invalid status {0}: {1}", [$code, $err]);
            $this->response_code = 500;
        }
        else
        {
            $this->response_code = $code;
        }
        return $this;
    }
public function setResponseCode ( int $ code ) { if ( $ code < 100 || $ code > 599 ) { $ err = new \ InvalidArgumentException ( "Attempting to set status code to $code" ) ; self :: $ logger -> critical ( "Invalid status {0}: {1}" , [ $ code , $ err ] ) ; $ this -> response_code = 500 ; } else { $ this -> response_code = $ code ; } return $ this ; }
Set the HTTP Response code

@param int $code The HTTP response code
@return Wedeto\HTTP\Responder Provides fluent interface
Set the HTTP Response code