Code Duplication    Length = 18-18 lines in 3 locations

src/AMQP091/Exchange.php 2 locations

@@ 93-110 (lines=18) @@
90
    /**
91
     * {@inheritdoc}
92
     */
93
    public function bind($exchange, $routingKey = '', array $arguments = [], $flags = 0)
94
    {
95
        $this->send(new ExchangeBind(
96
            $this->channel,
97
            0,
98
            $exchange,
99
            $this->name,
100
            $routingKey,
101
            (bool) ($flags & self::FLAG_NO_WAIT),
102
            $arguments
103
        ));
104
105
        if (!($flags & self::FLAG_NO_WAIT)) {
106
            $this->wait(ExchangeBindOk::class);
107
        }
108
109
        return $this;
110
    }
111
112
    /**
113
     * {@inheritdoc}
@@ 115-132 (lines=18) @@
112
    /**
113
     * {@inheritdoc}
114
     */
115
    public function unbind($exchange, $routingKey = '', array $arguments = [], $flags = 0)
116
    {
117
        $this->send(new ExchangeUnbind(
118
            $this->channel,
119
            0,
120
            $exchange,
121
            $this->name,
122
            $routingKey,
123
            (bool) ($flags & self::FLAG_NO_WAIT),
124
            $arguments
125
        ));
126
127
        if (!($flags & self::FLAG_NO_WAIT)) {
128
            $this->wait(ExchangeUnbindOk::class);
129
        }
130
131
        return $this;
132
    }
133
134
    /**
135
     * {@inheritdoc}

src/AMQP091/Queue.php 1 location

@@ 117-134 (lines=18) @@
114
    /**
115
     * {@inheritdoc}
116
     */
117
    public function bind($exchange, $routingKey = '', array $arguments = [], $flags = 0)
118
    {
119
        $this->send(new QueueBind(
120
            $this->channel,
121
            0,
122
            $this->name,
123
            (string) $exchange,
124
            $routingKey,
125
            $flags & self::FLAG_NO_WAIT,
126
            $arguments
127
        ));
128
129
        if (!($flags & self::FLAG_NO_WAIT)) {
130
            $this->wait(QueueBindOk::class);
131
        }
132
133
        return $this;
134
    }
135
136
    /**
137
     * {@inheritdoc}