Code Duplication    Length = 10-10 lines in 4 locations

includes/jobqueue/JobQueueRedis.php 4 locations

@@ 518-527 (lines=10) @@
515
	 * @return Iterator
516
	 * @throws JobQueueError
517
	 */
518
	public function getAllQueuedJobs() {
519
		$conn = $this->getConnection();
520
		try {
521
			$uids = $conn->lRange( $this->getQueueKey( 'l-unclaimed' ), 0, -1 );
522
		} catch ( RedisException $e ) {
523
			$this->throwRedisException( $conn, $e );
524
		}
525
526
		return $this->getJobIterator( $conn, $uids );
527
	}
528
529
	/**
530
	 * @see JobQueue::getAllDelayedJobs()
@@ 534-543 (lines=10) @@
531
	 * @return Iterator
532
	 * @throws JobQueueError
533
	 */
534
	public function getAllDelayedJobs() {
535
		$conn = $this->getConnection();
536
		try {
537
			$uids = $conn->zRange( $this->getQueueKey( 'z-delayed' ), 0, -1 );
538
		} catch ( RedisException $e ) {
539
			$this->throwRedisException( $conn, $e );
540
		}
541
542
		return $this->getJobIterator( $conn, $uids );
543
	}
544
545
	/**
546
	 * @see JobQueue::getAllAcquiredJobs()
@@ 550-559 (lines=10) @@
547
	 * @return Iterator
548
	 * @throws JobQueueError
549
	 */
550
	public function getAllAcquiredJobs() {
551
		$conn = $this->getConnection();
552
		try {
553
			$uids = $conn->zRange( $this->getQueueKey( 'z-claimed' ), 0, -1 );
554
		} catch ( RedisException $e ) {
555
			$this->throwRedisException( $conn, $e );
556
		}
557
558
		return $this->getJobIterator( $conn, $uids );
559
	}
560
561
	/**
562
	 * @see JobQueue::getAllAbandonedJobs()
@@ 566-575 (lines=10) @@
563
	 * @return Iterator
564
	 * @throws JobQueueError
565
	 */
566
	public function getAllAbandonedJobs() {
567
		$conn = $this->getConnection();
568
		try {
569
			$uids = $conn->zRange( $this->getQueueKey( 'z-abandoned' ), 0, -1 );
570
		} catch ( RedisException $e ) {
571
			$this->throwRedisException( $conn, $e );
572
		}
573
574
		return $this->getJobIterator( $conn, $uids );
575
	}
576
577
	/**
578
	 * @param RedisConnRef $conn