Code Duplication    Length = 5-5 lines in 2 locations

Doctrine/BaseJobManager.php 2 locations

@@ 239-243 (lines=5) @@
236
                    $objectManager->remove($job);
237
                    continue;
238
                }
239
                if (null !== ($maxRetries = $job->getMaxRetries()) && $job->getRetries() >= $maxRetries) {
240
                    $job->setStatus(RetryableJob::STATUS_MAX_RETRIES);
241
                    $objectManager->remove($job);
242
                    continue;
243
                }
244
245
                $job->setRetries($job->getRetries() + 1);
246
                $job->setStatus(BaseJob::STATUS_NEW);
@@ 379-383 (lines=5) @@
376
377
        foreach ($results as $jobArchive) {
378
            /** @var RetryableJob $jobArchive */
379
            if (null !== ($maxRetries = $jobArchive->getMaxRetries()) && $jobArchive->getRetries() >= $maxRetries) {
380
                $jobArchive->setStatus(RetryableJob::STATUS_MAX_RETRIES);
381
                $objectManager->persist($jobArchive);
382
                continue;
383
            }
384
385
            /** @var RetryableJob $job */
386
            $job = new $className();