Code Duplication    Length = 13-14 lines in 2 locations

src/Entity/ExchangeEntity.php 1 location

@@ 114-127 (lines=14) @@
111
            );
112
    }
113
114
    public function bind()
115
    {
116
        if (!isset($this->attributes['bind'])) {
117
            return;
118
        }
119
        foreach ($this->attributes['bind'] as $bindItem) {
120
            $this->getChannel()
121
                ->queue_bind(
122
                    $bindItem['queue'],
123
                    $this->attributes['name'],
124
                    $bindItem['routing_key']
125
                );
126
        }
127
    }
128
129
    /**
130
     * Delete the queue

src/Entity/QueueEntity.php 1 location

@@ 172-184 (lines=13) @@
169
            );
170
    }
171
172
    public function bind()
173
    {
174
        if (isset($this->attributes['bind'])) {
175
            foreach ($this->attributes['bind'] as $bindItem) {
176
                $this->getChannel()
177
                    ->queue_bind(
178
                        $this->attributes['name'],
179
                        $bindItem['exchange'],
180
                        $bindItem['routing_key']
181
                    );
182
            }
183
        }
184
    }
185
186
    /**
187
     * Delete the queue