original_string: private function _retrieveNodeText(DOMNode $node, &$text)
      {
          if ($node->nodeType == XML_TEXT_NODE) {
              $text .= $node->nodeValue;
              if(!in_array($node->parentNode->tagName, $this->_inlineTags)) {
                  $text .= ' ';
              }
          } else if ($node->nodeType == XML_ELEMENT_NODE  &&  $node->nodeName != 'script') {
              foreach ($node->childNodes as $childNode) {
                  $this->_retrieveNodeText($childNode, $text);
              }
          }
      }
code: private function _retrieveNodeText(DOMNode $node, &$text)
      {
          if ($node->nodeType == XML_TEXT_NODE) {
              $text .= $node->nodeValue;
              if(!in_array($node->parentNode->tagName, $this->_inlineTags)) {
                  $text .= ' ';
              }
          } else if ($node->nodeType == XML_ELEMENT_NODE  &&  $node->nodeName != 'script') {
              foreach ($node->childNodes as $childNode) {
                  $this->_retrieveNodeText($childNode, $text);
              }
          }
      }
code_tokens: private function _retrieveNodeText ( DOMNode $ node , & $ text ) { if ( $ node -> nodeType == XML_TEXT_NODE ) { $ text .= $ node -> nodeValue ; if ( ! in_array ( $ node -> parentNode -> tagName , $ this -> _inlineTags ) ) { $ text .= ' ' ; } } else if ( $ node -> nodeType == XML_ELEMENT_NODE && $ node -> nodeName != 'script' ) { foreach ( $ node -> childNodes as $ childNode ) { $ this -> _retrieveNodeText ( $ childNode , $ text ) ; } } }
docstring: Get node text
  
  We should exclude scripts, which may be not included into comment tags, CDATA sections,
  
  @param DOMNode $node
  @param string  &$text
docstring_tokens: Get node text