protected function getResponseData(Response $response)
    {
        if ($response instanceof JsonResponse) {
            /** @var $response JsonResponse */
            return $response->getData(true) ?: [];
        }

        $content = $response->getContent();

        return json_decode($content, true) ?: false;
    }
protected function getResponseData(Response $response)
    {
        if ($response instanceof JsonResponse) {
            /** @var $response JsonResponse */
            return $response->getData(true) ?: [];
        }

        $content = $response->getContent();

        return json_decode($content, true) ?: false;
    }
protected function getResponseData ( Response $ response ) { if ( $ response instanceof JsonResponse ) { /** @var $response JsonResponse */ return $ response -> getData ( true ) ? : [ ] ; } $ content = $ response -> getContent ( ) ; return json_decode ( $ content , true ) ? : false ; }
Fetches the contents of the response and parses them to an assoc array

@param Response $response
@return array|bool
Fetches the contents of the response and parses them to an assoc array