code: 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;
      }
docs: {@inheritDoc}