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

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

modules/ticket_selector/ProcessTicketSelector.php 1 location

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