original_string: protected static function DOMNodeChildCount(DOMNode $node)
      {
          $count = 0;
  
          if ($node->hasChildNodes()) {
              foreach ($node->childNodes as $child) {
                  if ($child->nodeType == XML_ELEMENT_NODE) {
                      $count++;
                  }
              }
          }
  
          return $count;
      }
code: protected static function DOMNodeChildCount(DOMNode $node)
      {
          $count = 0;
  
          if ($node->hasChildNodes()) {
              foreach ($node->childNodes as $child) {
                  if ($child->nodeType == XML_ELEMENT_NODE) {
                      $count++;
                  }
              }
          }
  
          return $count;
      }
code_tokens: protected static function DOMNodeChildCount ( DOMNode $ node ) { $ count = 0 ; if ( $ node -> hasChildNodes ( ) ) { foreach ( $ node -> childNodes as $ child ) { if ( $ child -> nodeType == XML_ELEMENT_NODE ) { $ count ++ ; } } } return $ count ; }
docstring: Count the children of a DOMNode
  
  @static
  @param   DOMNode $node
  @return  int
docstring_tokens: Count the children of a DOMNode