original_string: public function flatten_children(array $items) : array {
          $result = [];
  
          foreach ($items as [$item, $children]) {
              $result[] = $item;
              $result = array_merge($result, $this->flatten_children($children));
          }
  
          return $result;
      }
code: public function flatten_children(array $items) : array {
          $result = [];
  
          foreach ($items as [$item, $children]) {
              $result[] = $item;
              $result = array_merge($result, $this->flatten_children($children));
          }
  
          return $result;
      }
code_tokens: public function flatten_children ( array $ items ) : array { $ result = [ ] ; foreach ( $ items as [ $ item , $ children ] ) { $ result [ ] = $ item ; $ result = array_merge ( $ result , $ this -> flatten_children ( $ children ) ) ; } return $ result ; }
docstring: Take the data structure returned from "sort_into_children" and flatten it back
  into an array. It does a depth first flatten which maintains the reply ordering.
  
  @param array $items Items in the data structure returned by "sort_into_children"
  @return array A flat array.
docstring_tokens: Take the data structure returned from sort_into_children and flatten it back into an array . It does a depth first flatten which maintains the reply ordering .