src/PutIO/Helpers/HTTP/HTTPHelper.php
protected function getResponse($response, $returnBool, $arrayKey = '')
    {
        $response = $this->jsonDecode($response);

        if ($response === \null) {
            return \false;
        }
        
        if ($returnBool) {
            return $this->getStatus($response);
        }
        
        if ($arrayKey) {
            if (isset($response[$arrayKey])) {
                return $response[$arrayKey];
            }

            return \false;
        }
        
        return $response;
    }
protected function getResponse($response, $returnBool, $arrayKey = '')
    {
        $response = $this->jsonDecode($response);

        if ($response === \null) {
            return \false;
        }
        
        if ($returnBool) {
            return $this->getStatus($response);
        }
        
        if ($arrayKey) {
            if (isset($response[$arrayKey])) {
                return $response[$arrayKey];
            }

            return \false;
        }
        
        return $response;
    }
protected function getResponse ( $ response , $ returnBool , $ arrayKey = '' ) { $ response = $ this -> jsonDecode ( $ response ) ; if ( $ response === \ null ) { return \ false ; } if ( $ returnBool ) { return $ this -> getStatus ( $ response ) ; } if ( $ arrayKey ) { if ( isset ( $ response [ $ arrayKey ] ) ) { return $ response [ $ arrayKey ] ; } return \ false ; } return $ response ; }
Decodes the response and returns the appropriate value

@param string $response      Response data from server.
@param bool   $returnBool    Whether or not to return boolean
@param string $arrayKey      Will return all data on a specific array key
of the response.
@return array|bool
Decodes the response and returns the appropriate value