Code Duplication    Length = 7-9 lines in 4 locations

classes/helpers/FrmListHelper.php 4 locations

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