Code Duplication    Length = 12-12 lines in 3 locations

src/Queue/Subscribe/AMQPSubscribeEventQueue.php 1 location

@@ 127-138 (lines=12) @@
124
     *
125
     * @return bool
126
     */
127
    public function unsubscribe(callable $handler)
128
    {
129
        $index = array_search($handler, $this->handlers);
130
131
        if ($index === false) {
132
            return false;
133
        }
134
135
        unset($this->handlers[$index]);
136
137
        return true;
138
    }
139
140
    private function declareQueue()
141
    {

src/Queue/Subscribe/ExecutingSubscribeEventQueue.php 1 location

@@ 56-67 (lines=12) @@
53
     *
54
     * @return bool
55
     */
56
    public function unsubscribe(callable $handler)
57
    {
58
        $index = array_search($handler, $this->handlers);
59
60
        if ($index === false) {
61
            return false;
62
        }
63
64
        unset($this->handlers[$index]);
65
66
        return true;
67
    }
68
}
69

src/Queue/Subscribe/PredisSubscribeEventQueue.php 1 location

@@ 108-119 (lines=12) @@
105
     *
106
     * @return bool
107
     */
108
    public function unsubscribe(callable $handler)
109
    {
110
        $index = array_search($handler, $this->handlers);
111
112
        if ($index === false) {
113
            return false;
114
        }
115
116
        unset($this->handlers[$index]);
117
118
        return true;
119
    }
120
121
    /**
122
     * @param mixed $message