Code Duplication    Length = 3-3 lines in 2 locations

core/libraries/plugin_api/EE_Register_Addon.lib.php 1 location

@@ 163-165 (lines=3) @@
160
		if ( empty( $addon_name ) || ! is_array( $setup_args )) {
161
			throw new EE_Error( __( 'In order to register an EE_Addon with EE_Register_Addon::register(), you must include the "addon_name" (the name of the addon), and an array of arguments.', 'event_espresso' ));
162
		}
163
		if ( ! isset($setup_args[ 'main_file_path' ]) || empty( $setup_args[ 'main_file_path' ] ) ){
164
			throw new EE_Error( sprintf( __( 'When registering an addon, you didn\'t provide the "main_file_path", which is the full path to the main file loaded directly by Wordpress. You only provided %s', 'event_espresso' ), implode(",", array_keys( $setup_args ) ) ) );
165
		}
166
		// check that addon has not already been registered with that name
167
		if ( isset( self::$_settings[ $addon_name ] ) && ! did_action( 'activate_plugin' ) ) {
168
			throw new EE_Error( sprintf( __( 'An EE_Addon with the name "%s" has already been registered and each EE_Addon requires a unique name.', 'event_espresso' ), $addon_name ));

core/db_models/EEM_Base.model.php 1 location

@@ 2736-2738 (lines=3) @@
2733
					//then $possible_array_of_params looks something like array('<','DTT_sold',true)
2734
					//indicating that $possible_array_of_params[1] is actually a field name,
2735
					//from which we should extract query parameters!
2736
					if( ! isset($possibly_array_of_params[0], $possibly_array_of_params[1] ) ) {
2737
						throw new EE_Error(sprintf(__("Improperly formed query parameter %s. It should be numerically indexed like array('<','DTT_sold',true); but you provided %s", "event_espresso"),$query_param_type,implode(",",$possibly_array_of_params)));
2738
					}
2739
					$this->_extract_related_model_info_from_query_param($possibly_array_of_params[1], $model_query_info_carrier, $query_param_type);
2740
				}
2741
			}