Code Duplication    Length = 7-9 lines in 4 locations

classes/helpers/FrmListHelper.php 4 locations

@@ 560-568 (lines=9) @@
557
			$disable_last = true;
558
		}
559
560
		if ( $disable_first ) {
561
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&laquo;</span>';
562
		} else {
563
			$page_links[] = sprintf( "<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
564
				esc_url( remove_query_arg( 'paged', $current_url ) ),
565
				__( 'First page' ),
566
				'&laquo;'
567
			);
568
		}
569
570
		if ( $disable_prev ) {
571
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
@@ 572-578 (lines=7) @@
569
570
		if ( $disable_prev ) {
571
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
572
		} else {
573
			$page_links[] = sprintf( "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
574
				esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
575
				__( 'Previous page' ),
576
				'&lsaquo;'
577
			);
578
		}
579
580
		if ( 'bottom' == $which ) {
581
			$html_current_page  = $current;
@@ 593-601 (lines=9) @@
590
		$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
591
		$page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
592
593
		if ( $disable_next ) {
594
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
595
		} else {
596
			$page_links[] = sprintf( "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
597
				esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
598
				__( 'Next page' ),
599
				'&rsaquo;'
600
			);
601
		}
602
603
		if ( $disable_last ) {
604
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
@@ 603-611 (lines=9) @@
600
			);
601
		}
602
603
		if ( $disable_last ) {
604
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
605
		} else {
606
			$page_links[] = sprintf( "<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
607
				esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
608
				__( 'Last page' ),
609
				'&raquo;'
610
			);
611
		}
612
613
		$pagination_links_class = 'pagination-links';
614
		if ( ! empty( $infinite_scroll ) ) {