private function readContent(): bool
    {
        $rawContent = $this->getRequest()->getRawContent();
        if ($rawContent === '') {
            $this->content = null;

            return true;
        }

        $this->content = json_decode($rawContent, true);
        if (json_last_error() !== JSON_ERROR_NONE) {
            $this->getResponse()->setStatusCode(new StatusCode(StatusCode::BAD_REQUEST));

            return false;
        }

        return true;
    }
private function readContent(): bool
    {
        $rawContent = $this->getRequest()->getRawContent();
        if ($rawContent === '') {
            $this->content = null;

            return true;
        }

        $this->content = json_decode($rawContent, true);
        if (json_last_error() !== JSON_ERROR_NONE) {
            $this->getResponse()->setStatusCode(new StatusCode(StatusCode::BAD_REQUEST));

            return false;
        }

        return true;
    }
private function readContent ( ) : bool { $ rawContent = $ this -> getRequest ( ) -> getRawContent ( ) ; if ( $ rawContent === '' ) { $ this -> content = null ; return true ; } $ this -> content = json_decode ( $ rawContent , true ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { $ this -> getResponse ( ) -> setStatusCode ( new StatusCode ( StatusCode :: BAD_REQUEST ) ) ; return false ; } return true ; }
Reads the content.

@return bool True if content was successfully read, false otherwise.
Reads the content .