src/Response/Normaliser.php
public function normalise($response, $format)
    {
        switch ($format) {
            case 'json':
                $response = $this->getJsonUnserialiser()->unserialise($response);
                break;

            case 'xml':
                $response = $this->getXmlUnserialiser()->unserialise($response);
                break;

            case 'plain':
            case 'stream':
                $response = $this->getPlainUnserialiser()->unserialise($response);
                break;

            default:
                throw new InvalidArgumentException('Invalid response format specified.');
                break;
        }

        return $response;
    }
public function normalise($response, $format)
    {
        switch ($format) {
            case 'json':
                $response = $this->getJsonUnserialiser()->unserialise($response);
                break;

            case 'xml':
                $response = $this->getXmlUnserialiser()->unserialise($response);
                break;

            case 'plain':
            case 'stream':
                $response = $this->getPlainUnserialiser()->unserialise($response);
                break;

            default:
                throw new InvalidArgumentException('Invalid response format specified.');
                break;
        }

        return $response;
    }
@param $response
@param $format

@return mixed