Code Duplication    Length = 7-7 lines in 2 locations

includes/admin/reports/class-donor-reports-table.php 1 location

@@ 186-192 (lines=7) @@
183
				$value    = '<a href="' . esc_url( $view_url ) . '">' . $name . '</a>';
184
				break;
185
186
			case 'num_donations' :
187
				$value = sprintf(
188
					'<a href="%s">%s</a>',
189
					admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&donor=' . absint( $item['id'] ) ),
190
						esc_html( $item['num_donations'] )
191
					);
192
				break;
193
194
			case 'amount_spent' :
195
				$value = give_currency_filter( give_format_amount( $item[ $column_name ], array( 'sanitize' => false ) ) );

includes/admin/donors/class-donor-table.php 1 location

@@ 119-125 (lines=7) @@
116
117
		switch ( $column_name ) {
118
119
			case 'num_donations' :
120
				$value = sprintf(
121
					'<a href="%s">%s</a>',
122
					admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&donor=' . absint( $donor['id'] ) ),
123
					esc_html( $donor['num_donations'] )
124
				);
125
				break;
126
127
			case 'amount_spent' :
128
				$value = give_currency_filter( give_format_amount( $donor[ $column_name ], array( 'sanitize' => false ) ) );