Code Duplication    Length = 4-5 lines in 4 locations

core/db_classes/EE_CPT_Base.class.php 1 location

@@ 74-77 (lines=4) @@
71
	 * @return EE_Base_Class the relation was removed from
72
	 */
73
	function remove_relation_to_term_taxonomy( $term_taxonomy ) {
74
		if ( !$term_taxonomy ) {
75
			EE_Error::add_error( sprintf( __( "No Term_Taxonomy provided which to remove from model object of type %s and id %d", "event_espresso" ), get_class( $this ), $this->ID() ), __FILE__, __FUNCTION__, __LINE__ );
76
			return NULL;
77
		}
78
		$term_taxonomy->set_count( $term_taxonomy->count() - 1 );
79
		$term_taxonomy->save();
80
		return $this->_remove_relation_to( $term_taxonomy, 'Term_Taxonomy' );

core/libraries/messages/EE_messages.lib.php 1 location

@@ 226-230 (lines=5) @@
223
			if ( is_readable($load_file) ) {
224
				require_once($load_file);
225
				$active_names[$active] = $msg_name;
226
			} else {
227
				$this->_unset_active($active, $kind);
228
				//set WP_Error
229
				return EE_Error::add_error( sprintf( __("Missing messages system file set as inactive: (%s) %s has been made inactive.", 'event_espresso'), $load_file, $msg_name), __FILE__, __FUNCTION__, __LINE__ );
230
			}
231
		}
232
		return $active_names;
233
	}

core/db_classes/EE_Registration.class.php 1 location

@@ 1027-1030 (lines=4) @@
1024
			$datetime = $this->get_related_primary_datetime();
1025
			$DTT_ID = $datetime->ID();
1026
		// verify the registration can checkin for the given DTT_ID
1027
		} elseif ( ! $this->can_checkin( $DTT_ID, $verify ) ) {
1028
			EE_Error::add_error(
1029
					sprintf(
1030
						__( 'The given registration (ID:%1$d) can not be checked in to the given DTT_ID (%2$d), because the registration does not have access', 'event_espresso'),
1031
						$this->ID(),
1032
						$DTT_ID
1033
					),

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

@@ 758-761 (lines=4) @@
755
										$input_value = $primary_registrant[ $form_input ];
756
									}
757
									// now attempt to save the input data
758
									if ( ! $this->_save_registration_form_input( $registration, $form_input, $input_value ))  {
759
										EE_Error::add_error( sprintf( __( 'Unable to save registration form data for the form input: "%1$s" with the submitted value: "%2$s"', 'event_espresso' ), $form_input, $input_value ), __FILE__, __FUNCTION__, __LINE__ );
760
										return FALSE;
761
									}
762
								}
763
							}
764
						}  // end of foreach ( $valid_data[ $reg_url_link ] as $form_section => $form_inputs )