original_string: protected function parseResponse($body)
      {
          $this->all = (int)$body->getElementsByTagName('paymentMethod')->length;
  
          if ($this->all > 0) {
  
              for ($i = 0; $i < $this->all; $i++) {
  
                  $paymentMethod = $body->getElementsByTagName('paymentMethod')->item($i);
  
                  $this->pMethIds[$i]     = $paymentMethod->getAttribute("id");
                  $this->pTypes[$i]       = $paymentMethod->getElementsByTagName('pType')->item(0)->nodeValue;
                  $this->brands[$i]       = $paymentMethod->getElementsByTagName('brand')->item(0)->nodeValue;
                  $this->descriptions[$i] = $paymentMethod->getElementsByTagName('description')->item(0)->nodeValue;
              }
          }
      }
code: protected function parseResponse($body)
      {
          $this->all = (int)$body->getElementsByTagName('paymentMethod')->length;
  
          if ($this->all > 0) {
  
              for ($i = 0; $i < $this->all; $i++) {
  
                  $paymentMethod = $body->getElementsByTagName('paymentMethod')->item($i);
  
                  $this->pMethIds[$i]     = $paymentMethod->getAttribute("id");
                  $this->pTypes[$i]       = $paymentMethod->getElementsByTagName('pType')->item(0)->nodeValue;
                  $this->brands[$i]       = $paymentMethod->getElementsByTagName('brand')->item(0)->nodeValue;
                  $this->descriptions[$i] = $paymentMethod->getElementsByTagName('description')->item(0)->nodeValue;
              }
          }
      }
code_tokens: protected function parseResponse ( $ body ) { $ this -> all = ( int ) $ body -> getElementsByTagName ( 'paymentMethod' ) -> length ; if ( $ this -> all > 0 ) { for ( $ i = 0 ; $ i < $ this -> all ; $ i ++ ) { $ paymentMethod = $ body -> getElementsByTagName ( 'paymentMethod' ) -> item ( $ i ) ; $ this -> pMethIds [ $ i ] = $ paymentMethod -> getAttribute ( "id" ) ; $ this -> pTypes [ $ i ] = $ paymentMethod -> getElementsByTagName ( 'pType' ) -> item ( 0 ) -> nodeValue ; $ this -> brands [ $ i ] = $ paymentMethod -> getElementsByTagName ( 'brand' ) -> item ( 0 ) -> nodeValue ; $ this -> descriptions [ $ i ] = $ paymentMethod -> getElementsByTagName ( 'description' ) -> item ( 0 ) -> nodeValue ; } } }
docstring: Parse the ListPaymentMethodsResponse message and save the data to the corresponding attributes
  
  @param \DOMElement $body
docstring_tokens: Parse the ListPaymentMethodsResponse message and save the data to the corresponding attributes