Code Duplication    Length = 10-10 lines in 2 locations

RabbitMQ/JobManager.php 1 location

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

Redis/JobManager.php 1 location

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