Code Duplication    Length = 21-22 lines in 2 locations

modules/single_page_checkout/reg_steps/attendee_information/EE_SPCO_Reg_Step_Attendee_Information.class.php 1 location

@@ 931-952 (lines=22) @@
928
										$input_value = $primary_registrant[ $form_input ];
929
									}
930
									// now attempt to save the input data
931
									if (
932
										! $this->_save_registration_form_input(
933
											$registration,
934
											$form_input,
935
											$input_value
936
										)
937
									) {
938
										EE_Error::add_error(
939
											sprintf(
940
												__(
941
													'Unable to save registration form data for the form input: "%1$s" with the submitted value: "%2$s"',
942
													'event_espresso'
943
												),
944
												$form_input,
945
												$input_value
946
											),
947
											__FILE__,
948
											__FUNCTION__,
949
											__LINE__
950
										);
951
										return false;
952
									}
953
								}
954
							}
955
						}  // end of foreach ( $valid_data[ $reg_url_link ] as $form_section => $form_inputs )

modules/ticket_selector/ProcessTicketSelector.php 1 location

@@ 426-446 (lines=21) @@
423
        // for the last ticket selected PRIOR to subtracting tickets
424
        $available_spaces = $this->ticketDatetimeAvailability( $ticket, true );
425
        // greedy greedy greedy eh?
426
        if ( $available_spaces > 0 ) {
427
            if (
428
            apply_filters(
429
                'FHEE__EE_Ticket_Selector___add_ticket_to_cart__allow_display_availability_error',
430
                true,
431
                $ticket,
432
                $qty,
433
                $available_spaces
434
            )
435
            ) {
436
                $this->displayAvailabilityError($available_spaces);
437
            }
438
        } else {
439
            \EE_Error::add_error(
440
                __(
441
                    'We\'re sorry, but there are no available spaces left for this event at this particular date and time.',
442
                    'event_espresso'
443
                ),
444
                __FILE__, __FUNCTION__, __LINE__
445
            );
446
        }
447
        return false;
448
    }
449