original_string: protected function markingFinished($numChildrenMethod="numChildren") {
          // Mark childless nodes as expanded.
          if($this->markedNodes) {
              foreach($this->markedNodes as $id => $node) {
                  if(!$node->isExpanded() && !$node->$numChildrenMethod()) {
                      $node->markExpanded();
                  }
              }
          }
      }
code: protected function markingFinished($numChildrenMethod="numChildren") {
          // Mark childless nodes as expanded.
          if($this->markedNodes) {
              foreach($this->markedNodes as $id => $node) {
                  if(!$node->isExpanded() && !$node->$numChildrenMethod()) {
                      $node->markExpanded();
                  }
              }
          }
      }
code_tokens: protected function markingFinished ( $ numChildrenMethod = "numChildren" ) { // Mark childless nodes as expanded. if ( $ this -> markedNodes ) { foreach ( $ this -> markedNodes as $ id => $ node ) { if ( ! $ node -> isExpanded ( ) && ! $ node -> $ numChildrenMethod ( ) ) { $ node -> markExpanded ( ) ; } } } }
docstring: Ensure marked nodes that have children are also marked expanded.
  Call this after marking but before iterating over the tree.
docstring_tokens: Ensure marked nodes that have children are also marked expanded . Call this after marking but before iterating over the tree .