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);
    }
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);
    }
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 ) ; }
reverse method.

@method reverse

@return object Collection
reverse method .