public function clear(): QueueInterface
    {
        $positions = [];
        $max = $this->count();
        for ($i = 0; $i < $max; $i++) {
            $positions[] = $i;
        }
        $this->removeTracks($positions);

        return $this;
    }
public function clear(): QueueInterface
    {
        $positions = [];
        $max = $this->count();
        for ($i = 0; $i < $max; $i++) {
            $positions[] = $i;
        }
        $this->removeTracks($positions);

        return $this;
    }
public function clear ( ) : QueueInterface { $ positions = [ ] ; $ max = $ this -> count ( ) ; for ( $ i = 0 ; $ i < $ max ; $ i ++ ) { $ positions [ ] = $ i ; } $ this -> removeTracks ( $ positions ) ; return $ this ; }
Remove all tracks from the queue.

@return $this
Remove all tracks from the queue .