public function setStatusCode($statusCode, $message = null)
    {
        $this->statusCode = (int) $statusCode;

        // Add status message to meta array
        $this->addMeta(['status' => ['code' => (int) $statusCode]]);

        // Set optional status message if present
        if (!empty($message)) {
            $this->setStatusMessage($message);
        }

        return $this;
    }