original_string: public function reverse() : self
      {
          $list = $this->list;
          $count = $this->list->getSize();
          $newList = new \SplFixedArray($count);
  
          foreach ($newList as $index => $val) {
              $newList[$index] = $list[$count - $index - 1];
          }
  
          return new static($newList);
      }
code: public function reverse() : self
      {
          $list = $this->list;
          $count = $this->list->getSize();
          $newList = new \SplFixedArray($count);
  
          foreach ($newList as $index => $val) {
              $newList[$index] = $list[$count - $index - 1];
          }
  
          return new static($newList);
      }
code_tokens: public function reverse ( ) : self { $ list = $ this -> list ; $ count = $ this -> list -> getSize ( ) ; $ newList = new \ SplFixedArray ( $ count ) ; foreach ( $ newList as $ index => $ val ) { $ newList [ $ index ] = $ list [ $ count - $ index - 1 ] ; } return new static ( $ newList ) ; }
docstring: reverse method.
  
  @method reverse
  
  @return object Collection
docstring_tokens: reverse method .