public function shuffle($in_place = false)
    {
        if ($in_place) {
            shuffle($this->list);

            return $this;
        }

        $shuffled = $this->list;
        shuffle($shuffled);

        return new ItemList($shuffled);
    }
public function shuffle($in_place = false)
    {
        if ($in_place) {
            shuffle($this->list);

            return $this;
        }

        $shuffled = $this->list;
        shuffle($shuffled);

        return new ItemList($shuffled);
    }
public function shuffle ( $ in_place = false ) { if ( $ in_place ) { shuffle ( $ this -> list ) ; return $ this ; } $ shuffled = $ this -> list ; shuffle ( $ shuffled ) ; return new ItemList ( $ shuffled ) ; }
Shuffle the list.

@param bool $in_place Replace the current list if true, return a new instance if false
Shuffle the list .