Code Duplication    Length = 14-15 lines in 2 locations

src/Services/QueuedJobService.php 2 locations

@@ 340-353 (lines=14) @@
337
338
        // finally, find the list of broken jobs and send an email if there's some found
339
        $brokenJobs = QueuedJobDescriptor::get()->filter('JobStatus', QueuedJob::STATUS_BROKEN);
340
        if ($brokenJobs && $brokenJobs->count()) {
341
            $this->getLogger()->error(
342
                print_r(
343
                    array(
344
                        'errno' => 0,
345
                        'errstr' => 'Broken jobs were found in the job queue',
346
                        'errfile' => __FILE__,
347
                        'errline' => __LINE__,
348
                        'errcontext' => array()
349
                    ),
350
                    true
351
                )
352
            );
353
        }
354
    }
355
356
    /**
@@ 661-675 (lines=15) @@
658
                    if ($jobDescriptor) {
659
                        $this->copyJobToDescriptor($job, $jobDescriptor);
660
                        $jobDescriptor->write();
661
                    } else {
662
                        $this->getLogger()->error(
663
                            print_r(
664
                                array(
665
                                    'errno' => 0,
666
                                    'errstr' => 'Job descriptor has been set to null',
667
                                    'errfile' => __FILE__,
668
                                    'errline' => __LINE__,
669
                                    'errcontext' => array()
670
                                ),
671
                                true
672
                            )
673
                        );
674
                        $broken = true;
675
                    }
676
                }
677
678
                // a last final save. The job is complete by now