src/API/Implementation/ApiAbstract.php
private function prepareApiResponse(
        ResponseContextAbstract $responseContext,
        string $apiClassMethod
    ): ApiResponseInterface {
        $prepareApiResponse = sprintf("prepare%sResponse", ucfirst($apiClassMethod));

        $this->assertMethodExists($prepareApiResponse);

        $apiResponse = $this->{$prepareApiResponse}($responseContext);

        return $apiResponse;
    }
private function prepareApiResponse(
        ResponseContextAbstract $responseContext,
        string $apiClassMethod
    ): ApiResponseInterface {
        $prepareApiResponse = sprintf("prepare%sResponse", ucfirst($apiClassMethod));

        $this->assertMethodExists($prepareApiResponse);

        $apiResponse = $this->{$prepareApiResponse}($responseContext);

        return $apiResponse;
    }
private function prepareApiResponse ( ResponseContextAbstract $ responseContext , string $ apiClassMethod ) : ApiResponseInterface { $ prepareApiResponse = sprintf ( "prepare%sResponse" , ucfirst ( $ apiClassMethod ) ) ; $ this -> assertMethodExists ( $ prepareApiResponse ) ; $ apiResponse = $ this -> { $ prepareApiResponse } ( $ responseContext ) ; return $ apiResponse ; }
Prepares API response by processing ResponseContext

@param ResponseContextAbstract $responseContext
@param string $apiClassMethod

@throws MethodDoesNotExistException

@return ApiResponseInterface
Prepares API response by processing ResponseContext