Code Duplication    Length = 11-11 lines in 2 locations

Redis/JobManager.php 2 locations

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