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
@@ 376-387 (lines=12) @@
373
     * @param int $count
374
     * @return array
375
     */
376
    public function getFailedJobs($start = -100, $count = 100)
377
    {
378
        $jobs = \Resque::redis()->lrange('failed', $start, $count);
379
380
        $result = [];
381
382
        foreach ($jobs as $job) {
383
            $result[] = new FailedJob(json_decode($job, TRUE));
384
        }
385
386
        return $result;
387
    }
388
}
389