Code Duplication    Length = 7-9 lines in 4 locations

classes/helpers/FrmListHelper.php 4 locations

@@ 637-645 (lines=9) @@
634
			$disable_last = true;
635
		}
636
637
		if ( $disable_first ) {
638
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&laquo;</span>';
639
		} else {
640
			$page_links[] = sprintf( "<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
641
				esc_url( remove_query_arg( 'paged', $current_url ) ),
642
				__( 'First page' ),
643
				'&laquo;'
644
			);
645
		}
646
647
		if ( $disable_prev ) {
648
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
@@ 649-655 (lines=7) @@
646
647
		if ( $disable_prev ) {
648
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
649
		} else {
650
			$page_links[] = sprintf( "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
651
				esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
652
				__( 'Previous page' ),
653
				'&lsaquo;'
654
			);
655
		}
656
657
		if ( 'bottom' == $which ) {
658
			$html_current_page  = $current;
@@ 670-678 (lines=9) @@
667
		$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
668
		$page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
669
670
		if ( $disable_next ) {
671
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
672
		} else {
673
			$page_links[] = sprintf( "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
674
				esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
675
				__( 'Next page' ),
676
				'&rsaquo;'
677
			);
678
		}
679
680
		if ( $disable_last ) {
681
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
@@ 680-688 (lines=9) @@
677
			);
678
		}
679
680
		if ( $disable_last ) {
681
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
682
		} else {
683
			$page_links[] = sprintf( "<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
684
				esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
685
				__( 'Last page' ),
686
				'&raquo;'
687
			);
688
		}
689
690
		$pagination_links_class = 'pagination-links';
691
		if ( ! empty( $infinite_scroll ) ) {