original_string: private function parseErrors(Curl $curl)
  	{
  
  		$this->rawResponse = $curl->result;
  
  		if ($curl->error) {
  			$this->error = array(
  				'type'    => self::C_ERROR_HTTP,
  				'message' => 'Curl error: ' . $curl->error,
  			);
  
  			return;
  		}
  
  		if ($curl->code != '200') {
  			$this->error = array(
  				'type'    => self::C_ERROR_HTTP,
  				'message' => 'Response code: ' . $curl->code,
  			);
  
  			return;
  		}
  
  		if (empty($curl->result)) {
  			$this->error = array(
  				'type'    => self::C_ERROR_GATEWAY,
  				'message' => 'Empty Response',
  			);
  
  			return;
  		}
  
  		$response = @json_decode($curl->result);
  		if (!$response || empty($response->type)) {
  			$this->error = array(
  				'type'    => self::C_ERROR_GATEWAY,
  				'message' => 'Response is not json or Unrecognized response format',
  			);
  
  			return;
  		}
  
  		if ($response->type == 'error') {
  			$this->error = array(
  				'type'    => self::C_ERROR_PROCESSING,
  				'message' => $response->message,
  			);
  
  			return;
  		}
  
  	}
code: private function parseErrors(Curl $curl)
  	{
  
  		$this->rawResponse = $curl->result;
  
  		if ($curl->error) {
  			$this->error = array(
  				'type'    => self::C_ERROR_HTTP,
  				'message' => 'Curl error: ' . $curl->error,
  			);
  
  			return;
  		}
  
  		if ($curl->code != '200') {
  			$this->error = array(
  				'type'    => self::C_ERROR_HTTP,
  				'message' => 'Response code: ' . $curl->code,
  			);
  
  			return;
  		}
  
  		if (empty($curl->result)) {
  			$this->error = array(
  				'type'    => self::C_ERROR_GATEWAY,
  				'message' => 'Empty Response',
  			);
  
  			return;
  		}
  
  		$response = @json_decode($curl->result);
  		if (!$response || empty($response->type)) {
  			$this->error = array(
  				'type'    => self::C_ERROR_GATEWAY,
  				'message' => 'Response is not json or Unrecognized response format',
  			);
  
  			return;
  		}
  
  		if ($response->type == 'error') {
  			$this->error = array(
  				'type'    => self::C_ERROR_PROCESSING,
  				'message' => $response->message,
  			);
  
  			return;
  		}
  
  	}
code_tokens: private function parseErrors ( Curl $ curl ) { $ this -> rawResponse = $ curl -> result ; if ( $ curl -> error ) { $ this -> error = array ( 'type' => self :: C_ERROR_HTTP , 'message' => 'Curl error: ' . $ curl -> error , ) ; return ; } if ( $ curl -> code != '200' ) { $ this -> error = array ( 'type' => self :: C_ERROR_HTTP , 'message' => 'Response code: ' . $ curl -> code , ) ; return ; } if ( empty ( $ curl -> result ) ) { $ this -> error = array ( 'type' => self :: C_ERROR_GATEWAY , 'message' => 'Empty Response' , ) ; return ; } $ response = @ json_decode ( $ curl -> result ) ; if ( ! $ response || empty ( $ response -> type ) ) { $ this -> error = array ( 'type' => self :: C_ERROR_GATEWAY , 'message' => 'Response is not json or Unrecognized response format' , ) ; return ; } if ( $ response -> type == 'error' ) { $ this -> error = array ( 'type' => self :: C_ERROR_PROCESSING , 'message' => $ response -> message , ) ; return ; } }
docstring: Parse error type
  
  @param Curl $curl
docstring_tokens: Parse error type