Code Duplication    Length = 8-10 lines in 2 locations

includes/class-give-html-elements.php 2 locations

@@ 62-71 (lines=10) @@
59
		$options = array();
60
61
		// Provide nice human readable options.
62
		if ( $payments ) {
63
			$options[0] = $args['placeholder'];
64
			foreach ( $payments as $payment ) {
65
66
				$options[ absint( $payment->ID ) ] = esc_html( '#' . $payment->ID . ' - ' . $payment->email . ' - ' . $payment->form_title );
67
68
			}
69
		} else {
70
			$options[0] = __( 'No donations found.', 'give' );
71
		}
72
73
		$output = $this->select( array(
74
			'name'             => $args['name'],
@@ 715-722 (lines=8) @@
712
713
		$options = array();
714
715
		if ( $users ) {
716
			$options[0] = $args['placeholder'];
717
			foreach ( $users as $user ) {
718
				$options[ absint( $user->ID ) ] = esc_html( $user->user_login . ' (' . $user->user_email . ')' );
719
			}
720
		} else {
721
			$options[0] = __( 'No users found.', 'give' );
722
		}
723
724
		$output = $this->select( array(
725
			'name'             => $args['name'],