Code Duplication    Length = 11-11 lines in 2 locations

Redis/JobManager.php 2 locations

@@ 141-151 (lines=11) @@
138
        }
139
140
        $whenQueue = $this->getWhenQueueCacheKey();
141
        if ($adjust && $this->redis->zRem($whenQueue, $foundJob->getId()) > 0) {
142
            if (!$this->insertJob($foundJob)) {
143
                // Job is expired
144
                $this->redis->lRem($crcCacheKey, 1, $foundJobCacheKey);
145
146
                return false;
147
            }
148
            $this->redis->zAdd($whenQueue, $foundJob->getWhenUs(), $foundJob->toMessage());
149
150
            return $foundJob;
151
        }
152
153
        if (null === $this->maxPriority) {
154
            return false;
@@ 158-168 (lines=11) @@
155
        }
156
157
        $priorityQueue = $this->getPriorityQueueCacheKey();
158
        if ($adjust && $this->redis->zRem($priorityQueue, $foundJob->getId()) > 0) {
159
            if (!$this->insertJob($foundJob)) {
160
                // Job is expired
161
                $this->redis->lRem($crcCacheKey, 1, $foundJobCacheKey);
162
163
                return false;
164
            }
165
            $this->redis->zAdd($priorityQueue, $foundJob->getPriority(), $foundJob->toMessage());
166
167
            return $foundJob;
168
        }
169
170
        return false;
171
    }