Code Duplication    Length = 10-12 lines in 2 locations

Resque.php 2 locations

@@ 315-324 (lines=10) @@
312
     * @param $timestamp
313
     * @return array
314
     */
315
    public function getJobsForTimestamp($timestamp)
316
    {
317
        $jobs = \Resque::redis()->lrange('delayed:' . $timestamp, 0, -1);
318
        $out = [];
319
        foreach ($jobs as $job) {
320
            $out[] = json_decode($job, TRUE);
321
        }
322
323
        return $out;
324
    }
325
326
    /**
327
     * @param $queue
@@ 343-354 (lines=12) @@
340
     * @param int $count
341
     * @return array
342
     */
343
    public function getFailedJobs($start = -100, $count = 100)
344
    {
345
        $jobs = \Resque::redis()->lrange('failed', $start, $count);
346
347
        $result = [];
348
349
        foreach ($jobs as $job) {
350
            $result[] = new FailedJob(json_decode($job, TRUE));
351
        }
352
353
        return $result;
354
    }
355
}
356