src/Shared/Queue/PriorityQueueTrait.php
public function combine(
        PriorityQueueInterface $queue
    )/*# : PriorityQueueInterface */ {
        // clone a new queue
        $nqueue = clone $this;

        // insert into new queue
        foreach ($queue as $data) {
            $nqueue->insert($data['data'], $data['priority'], $data['extra']);
        }

        return $nqueue;
    }
public function combine(
        PriorityQueueInterface $queue
    )/*# : PriorityQueueInterface */ {
        // clone a new queue
        $nqueue = clone $this;

        // insert into new queue
        foreach ($queue as $data) {
            $nqueue->insert($data['data'], $data['priority'], $data['extra']);
        }

        return $nqueue;
    }
{@inheritDoc}