Code Duplication    Length = 3-7 lines in 2 locations

modules/single_page_checkout/EED_Single_Page_Checkout.module.php 1 location

@@ 1013-1015 (lines=3) @@
1010
							$submission_error_messages = array();
1011
							// bad, bad, bad registrant
1012
							foreach( $this->checkout->current_step->reg_form->get_validation_errors_accumulated() as $validation_error ){
1013
								if ( $validation_error instanceof EE_Validation_Error ) {
1014
									$submission_error_messages[] = sprintf(
1015
										__( '%s : %s', 'event_espresso' ),
1016
										$validation_error->get_form_section()->html_label_text(),
1017
										$validation_error->getMessage()
1018
									);

admin_pages/transactions/Transactions_Admin_Page.core.php 1 location

@@ 1167-1173 (lines=7) @@
1164
				if ( ! $payment_form->is_valid() ) {
1165
					$submission_error_messages = array();
1166
					foreach ( $payment_form->get_validation_errors_accumulated() as $validation_error ) {
1167
						if ( $validation_error instanceof EE_Validation_Error ) {
1168
							$submission_error_messages[] = sprintf(
1169
								_x( '%s : %s', 'Form Section Name : Form Validation Error', 'event_espresso' ),
1170
								$validation_error->get_form_section()->html_label_text(),
1171
								$validation_error->getMessage()
1172
							);
1173
						}
1174
					}
1175
					EE_Error::add_error( join( '<br />', $submission_error_messages ), __FILE__, __FUNCTION__, __LINE__ );
1176
					return array();