src/LazyQueue.php
public function create(\AMQPChannel $channel, $declare = false)
    {
        $queue = new \AMQPQueue($channel);

        $queue->setName($this->name);
        $queue->setFlags($this->flags);

        // In some setups a empty array for setArguments will cause a segfault
        // so let's avoid that
        if (!empty($this->arguments)) {
            $queue->setArguments($this->arguments);
        }

        // Only setup a queue if we are forced or the queue is not durable
        if ($declare === true || $this->isDurable() === false) {
            $this->setup($queue);
        }

        return $queue;
    }
public function create(\AMQPChannel $channel, $declare = false)
    {
        $queue = new \AMQPQueue($channel);

        $queue->setName($this->name);
        $queue->setFlags($this->flags);

        // In some setups a empty array for setArguments will cause a segfault
        // so let's avoid that
        if (!empty($this->arguments)) {
            $queue->setArguments($this->arguments);
        }

        // Only setup a queue if we are forced or the queue is not durable
        if ($declare === true || $this->isDurable() === false) {
            $this->setup($queue);
        }

        return $queue;
    }
Create a @see \AMQPQueue instance using a given @see \AMQPChannel.

@param \AMQPChannel $channel
@param bool|false $declare If True then force the queue setup
@return \AMQPQueue