Code Duplication    Length = 7-9 lines in 4 locations

classes/helpers/FrmListHelper.php 4 locations

@@ 579-587 (lines=9) @@
576
			$disable_last = true;
577
		}
578
579
		if ( $disable_first ) {
580
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&laquo;</span>';
581
		} else {
582
			$page_links[] = sprintf( "<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
583
				esc_url( remove_query_arg( 'paged', $current_url ) ),
584
				__( 'First page' ),
585
				'&laquo;'
586
			);
587
		}
588
589
		if ( $disable_prev ) {
590
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
@@ 591-597 (lines=7) @@
588
589
		if ( $disable_prev ) {
590
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&lsaquo;</span>';
591
		} else {
592
			$page_links[] = sprintf( "<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
593
				esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
594
				__( 'Previous page' ),
595
				'&lsaquo;'
596
			);
597
		}
598
599
		if ( 'bottom' == $which ) {
600
			$html_current_page  = $current;
@@ 612-620 (lines=9) @@
609
		$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
610
		$page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
611
612
		if ( $disable_next ) {
613
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&rsaquo;</span>';
614
		} else {
615
			$page_links[] = sprintf( "<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
616
				esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
617
				__( 'Next page' ),
618
				'&rsaquo;'
619
			);
620
		}
621
622
		if ( $disable_last ) {
623
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
@@ 622-630 (lines=9) @@
619
			);
620
		}
621
622
		if ( $disable_last ) {
623
			$page_links[] = '<span class="tablenav-pages-navspan" aria-hidden="true">&raquo;</span>';
624
		} else {
625
			$page_links[] = sprintf( "<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
626
				esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
627
				__( 'Last page' ),
628
				'&raquo;'
629
			);
630
		}
631
632
		$pagination_links_class = 'pagination-links';
633
		if ( ! empty( $infinite_scroll ) ) {