Code Duplication    Length = 18-18 lines in 3 locations

src/AMQP091/Exchange.php 2 locations

@@ 106-123 (lines=18) @@
103
    /**
104
     * {@inheritdoc}
105
     */
106
    public function bind($exchange, $routingKey = '', array $arguments = [], $flags = 0)
107
    {
108
        $this->send(new ExchangeBind(
109
            $this->channel,
110
            0,
111
            $exchange,
112
            $this->name,
113
            $routingKey,
114
            (bool) ($flags & self::FLAG_NO_WAIT),
115
            $arguments
116
        ));
117
118
        if (!($flags & self::FLAG_NO_WAIT)) {
119
            $this->wait(ExchangeBindOk::class);
120
        }
121
122
        return $this;
123
    }
124
125
    /**
126
     * {@inheritdoc}
@@ 128-145 (lines=18) @@
125
    /**
126
     * {@inheritdoc}
127
     */
128
    public function unbind($exchange, $routingKey = '', array $arguments = [], $flags = 0)
129
    {
130
        $this->send(new ExchangeUnbind(
131
            $this->channel,
132
            0,
133
            $exchange,
134
            $this->name,
135
            $routingKey,
136
            (bool) ($flags & self::FLAG_NO_WAIT),
137
            $arguments
138
        ));
139
140
        if (!($flags & self::FLAG_NO_WAIT)) {
141
            $this->wait(ExchangeUnbindOk::class);
142
        }
143
144
        return $this;
145
    }
146
147
    /**
148
     * {@inheritdoc}

src/AMQP091/Queue.php 1 location

@@ 127-144 (lines=18) @@
124
    /**
125
     * {@inheritdoc}
126
     */
127
    public function bind($exchange, $routingKey = '', array $arguments = [], $flags = 0)
128
    {
129
        $this->send(new QueueBind(
130
            $this->channel,
131
            0,
132
            $this->name,
133
            (string) $exchange,
134
            $routingKey,
135
            $flags & self::FLAG_NO_WAIT,
136
            $arguments
137
        ));
138
139
        if (!($flags & self::FLAG_NO_WAIT)) {
140
            $this->wait(QueueBindOk::class);
141
        }
142
143
        return $this;
144
    }
145
146
    /**
147
     * {@inheritdoc}