Code Duplication    Length = 10-12 lines in 2 locations

Resque.php 2 locations

@@ 348-357 (lines=10) @@
345
     * @param $timestamp
346
     * @return array
347
     */
348
    public function getJobsForTimestamp($timestamp)
349
    {
350
        $jobs = \Resque::redis()->lrange('delayed:' . $timestamp, 0, -1);
351
        $out = [];
352
        foreach ($jobs as $job) {
353
            $out[] = json_decode($job, TRUE);
354
        }
355
356
        return $out;
357
    }
358
359
    /**
360
     * @param $queue
@@ 373-384 (lines=12) @@
370
     * @param int $count
371
     * @return array
372
     */
373
    public function getFailedJobs($start = -100, $count = 100)
374
    {
375
        $jobs = \Resque::redis()->lrange('failed', $start, $count);
376
377
        $result = [];
378
379
        foreach ($jobs as $job) {
380
            $result[] = new FailedJob(json_decode($job, TRUE));
381
        }
382
383
        return $result;
384
    }
385
386
    /**
387
     * @return int