Code Duplication    Length = 10-10 lines in 2 locations

RabbitMQ/JobManager.php 1 location

@@ 202-211 (lines=10) @@
199
     * @throws PriorityException
200
     * @throws ClassNotSubclassException
201
     */
202
    protected function validateSaveable(\Dtc\QueueBundle\Model\Job $job)
203
    {
204
        if (null !== $job->getPriority() && null === $this->maxPriority) {
205
            throw new PriorityException('This queue does not support priorities');
206
        }
207
208
        if (!$job instanceof Job) {
209
            throw new ClassNotSubclassException('Job needs to be instance of '.Job::class);
210
        }
211
    }
212
213
    /**
214
     * @param null $workerName

Redis/JobManager.php 1 location

@@ 279-288 (lines=10) @@
276
     * @throws PriorityException
277
     * @throws ClassNotSubclassException
278
     */
279
    protected function validateSaveable(\Dtc\QueueBundle\Model\Job $job)
280
    {
281
        if (null !== $job->getPriority() && null === $this->maxPriority) {
282
            throw new PriorityException('This queue does not support priorities');
283
        }
284
285
        if (!$job instanceof RetryableJob) {
286
            throw new ClassNotSubclassException('Job needs to be instance of '.RetryableJob::class);
287
        }
288
    }
289
290
    protected function verifyGetJobArgs($workerName = null, $methodName = null, $prioritize = true)
291
    {