Code Duplication    Length = 7-9 lines in 4 locations

classes/helpers/FrmListHelper.php 4 locations

@@ 737-745 (lines=9) @@
734
			$disable_last = true;
735
		}
736
737
		if ( $disable_first ) {
738
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&laquo;</span>';
739
		} else {
740
			$page_links[] = sprintf( "<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
741
				esc_url( remove_query_arg( 'paged', $current_url ) ),
742
				__( 'First page' ),
743
				'&laquo;'
744
			);
745
		}
746
747
		if ( $disable_prev ) {
748
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
@@ 749-755 (lines=7) @@
746
747
		if ( $disable_prev ) {
748
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
749
		} else {
750
			$page_links[] = sprintf( "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
751
				esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
752
				__( 'Previous page' ),
753
				'&lsaquo;'
754
			);
755
		}
756
757
		if ( 'bottom' == $which ) {
758
			$html_current_page  = $current;
@@ 770-778 (lines=9) @@
767
		$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
768
		$page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
769
770
		if ( $disable_next ) {
771
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
772
		} else {
773
			$page_links[] = sprintf( "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
774
				esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
775
				__( 'Next page' ),
776
				'&rsaquo;'
777
			);
778
		}
779
780
		if ( $disable_last ) {
781
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
@@ 780-788 (lines=9) @@
777
			);
778
		}
779
780
		if ( $disable_last ) {
781
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
782
		} else {
783
			$page_links[] = sprintf( "<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
784
				esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
785
				__( 'Last page' ),
786
				'&raquo;'
787
			);
788
		}
789
790
		$pagination_links_class = 'pagination-links';
791
		if ( ! empty( $infinite_scroll ) ) {