Code Duplication    Length = 5-5 lines in 3 locations

src/Provider/IronMqProvider.php 3 locations

@@ 124-128 (lines=5) @@
121
            $this->ironmq->deleteQueue($queueName);
122
            $this->queue = null;
123
        } catch ( \Exception $e) {
124
            if (false !== strpos($e->getMessage(), "Queue not found")) {
125
                $this->log(400, "Queue did not exist");
126
            } else {
127
                throw $e;
128
            }
129
        }
130
131
        $this->cache->delete($queueName);
@@ 229-233 (lines=5) @@
226
            $this->ironmq->deleteMessage($this->getNameWithPrefix(), $id, $reservationId);
227
            $this->log(200, "Message deleted.", ['message_id' => $id]);
228
        } catch ( \Exception $e) {
229
            if (false !== strpos($e->getMessage(), "Queue not found")) {
230
                $this->log(400, "Queue did not exist");
231
            } else {
232
                throw $e;
233
            }
234
        }
235
236
        return true;
@@ 264-268 (lines=5) @@
261
            $this->queue = $this->ironmq->getQueue($queueName);
262
            $this->cache->save($queueName, json_encode($this->queue));
263
        } catch (\Exception $e) {
264
            if (false !== strpos($e->getMessage(), "Queue not found")) {
265
                $this->log(400, "Queue did not exist");
266
            } else {
267
                throw $e;
268
            }
269
        }
270
271
        return false;