Code Duplication    Length = 9-9 lines in 4 locations

includes/process-donation.php 4 locations

@@ 593-601 (lines=9) @@
590
	) {
591
		
592
		// Validate card number field for empty check.
593
		if (
594
			isset( $posted_data['card_number'] ) &&
595
			empty( $posted_data['card_number'] )
596
		) {
597
			$required_fields['card_number'] = array(
598
				'error_id'      => 'empty_card_number',
599
				'error_message' => __( 'Please enter a credit card number.', 'give' ),
600
			);
601
		}
602
		
603
		// Validate card cvc field for empty check.
604
		if (
@@ 604-612 (lines=9) @@
601
		}
602
		
603
		// Validate card cvc field for empty check.
604
		if (
605
			isset( $posted_data['card_cvc'] ) &&
606
			empty( $posted_data['card_cvc'] )
607
		) {
608
			$required_fields['card_cvc'] = array(
609
				'error_id'      => 'empty_card_cvc',
610
				'error_message' => __( 'Please enter a credit card CVC information.', 'give' ),
611
			);
612
		}
613
		
614
		// Validate card name field for empty check.
615
		if (
@@ 615-623 (lines=9) @@
612
		}
613
		
614
		// Validate card name field for empty check.
615
		if (
616
			isset( $posted_data['card_name'] ) &&
617
			empty( $posted_data['card_name'] )
618
		) {
619
			$required_fields['card_name'] = array(
620
				'error_id'      => 'empty_card_name',
621
				'error_message' => __( 'Please enter a name of your credit card account holder.', 'give' ),
622
			);
623
		}
624
		
625
		// Validate card expiry field for empty check.
626
		if (
@@ 626-634 (lines=9) @@
623
		}
624
		
625
		// Validate card expiry field for empty check.
626
		if (
627
			isset( $posted_data['card_expiry'] ) &&
628
			empty( $posted_data['card_expiry'] )
629
		) {
630
			$required_fields['card_expiry'] = array(
631
				'error_id'      => 'empty_card_expiry',
632
				'error_message' => __( 'Please enter a credit card expiry date.', 'give' ),
633
			);
634
		}
635
	}
636
637
	$require_address = give_require_billing_address( $payment_mode );