original_string: public function getEndPoints()
      {
          $endPoints = array();
          if (!$this->hasChildren()) {
              return $endPoints;
          }
  
          foreach ($this->_children as $child) {
              $value = $child->getValue();
  
              if (null === $value) {
                  $endPoints[] = $this;
              } elseif ((null !== $value)
                  && $child->hasChildren())
              {
                  $childEndPoints = $child->getEndPoints();
                  if (!empty($childEndPoints)) {
                      $endPoints = array_merge($endPoints, $childEndPoints);
                  }
              } elseif ((null !== $value) && !$child->hasChildren()) {
                  $endPoints[] = $child;
              }
          }
  
          return $endPoints;
      }
code: public function getEndPoints()
      {
          $endPoints = array();
          if (!$this->hasChildren()) {
              return $endPoints;
          }
  
          foreach ($this->_children as $child) {
              $value = $child->getValue();
  
              if (null === $value) {
                  $endPoints[] = $this;
              } elseif ((null !== $value)
                  && $child->hasChildren())
              {
                  $childEndPoints = $child->getEndPoints();
                  if (!empty($childEndPoints)) {
                      $endPoints = array_merge($endPoints, $childEndPoints);
                  }
              } elseif ((null !== $value) && !$child->hasChildren()) {
                  $endPoints[] = $child;
              }
          }
  
          return $endPoints;
      }
code_tokens: public function getEndPoints ( ) { $ endPoints = array ( ) ; if ( ! $ this -> hasChildren ( ) ) { return $ endPoints ; } foreach ( $ this -> _children as $ child ) { $ value = $ child -> getValue ( ) ; if ( null === $ value ) { $ endPoints [ ] = $ this ; } elseif ( ( null !== $ value ) && $ child -> hasChildren ( ) ) { $ childEndPoints = $ child -> getEndPoints ( ) ; if ( ! empty ( $ childEndPoints ) ) { $ endPoints = array_merge ( $ endPoints , $ childEndPoints ) ; } } elseif ( ( null !== $ value ) && ! $ child -> hasChildren ( ) ) { $ endPoints [ ] = $ child ; } } return $ endPoints ; }
docstring: Retrieve the bottommost nodes of this node's tree
  
  Retrieves the bottommost nodes of the tree by recursively calling
  getEndPoints() on all children. If a child is null, it returns the parent
  as an end point.
  
  @return array
docstring_tokens: Retrieve the bottommost nodes of this node s tree