private function getRequestExceptionParts(RequestException $requestException)
    {
        $response = $requestException->getResponse();
        $parts = [];
        $parts['reason'] = $response ? $response->getReasonPhrase() : $requestException->getMessage();
        $parts['code'] = $response ? $response->getStatusCode() : $requestException->getCode();
        $parts['body'] = $response ? $response->getBody() : null;

        return $parts;
    }
private function getRequestExceptionParts(RequestException $requestException)
    {
        $response = $requestException->getResponse();
        $parts = [];
        $parts['reason'] = $response ? $response->getReasonPhrase() : $requestException->getMessage();
        $parts['code'] = $response ? $response->getStatusCode() : $requestException->getCode();
        $parts['body'] = $response ? $response->getBody() : null;

        return $parts;
    }
private function getRequestExceptionParts ( RequestException $ requestException ) { $ response = $ requestException -> getResponse ( ) ; $ parts = [ ] ; $ parts [ 'reason' ] = $ response ? $ response -> getReasonPhrase ( ) : $ requestException -> getMessage ( ) ; $ parts [ 'code' ] = $ response ? $ response -> getStatusCode ( ) : $ requestException -> getCode ( ) ; $ parts [ 'body' ] = $ response ? $ response -> getBody ( ) : null ; return $ parts ; }
Prepares an array of important exception parts based on composition of a
given exception.

@param  RequestException  $requestException

@return array
Prepares an array of important exception parts based on composition of a given exception .