original_string: public function convert_to_array($raw_data)
  	{
  		$xml = new \SimpleXMLElement($raw_data);
  		$xml->registerXPathNamespace(
  			self::XML_NAMESPACE,
  			self::XML_NAMESPACE_URL
  		);
  
  		$data = $xml->xpath(self::XPATH_CURRENCY);
  		$currencies = array();
  
  		foreach ($data as $currency)
  		{
  			$currencies[ (string) $currency->attributes()->currency] = (string) $currency->attributes()->rate;
  		}
  
  		return $currencies;
  	}
code: public function convert_to_array($raw_data)
  	{
  		$xml = new \SimpleXMLElement($raw_data);
  		$xml->registerXPathNamespace(
  			self::XML_NAMESPACE,
  			self::XML_NAMESPACE_URL
  		);
  
  		$data = $xml->xpath(self::XPATH_CURRENCY);
  		$currencies = array();
  
  		foreach ($data as $currency)
  		{
  			$currencies[ (string) $currency->attributes()->currency] = (string) $currency->attributes()->rate;
  		}
  
  		return $currencies;
  	}
code_tokens: public function convert_to_array ( $ raw_data ) { $ xml = new \ SimpleXMLElement ( $ raw_data ) ; $ xml -> registerXPathNamespace ( self :: XML_NAMESPACE , self :: XML_NAMESPACE_URL ) ; $ data = $ xml -> xpath ( self :: XPATH_CURRENCY ) ; $ currencies = array ( ) ; foreach ( $ data as $ currency ) { $ currencies [ ( string ) $ currency -> attributes ( ) -> currency ] = ( string ) $ currency -> attributes ( ) -> rate ; } return $ currencies ; }
docstring: Convert raw currency data to array of currencies
  @param  string $raw_data currency data in XML format
  @return array            currencies
docstring_tokens: Convert raw currency data to array of currencies