Code Duplication    Length = 7-17 lines in 2 locations

core/libraries/form_sections/base/EE_Form_Section_Proper.form.php 1 location

@@ 267-273 (lines=7) @@
264
	 * @return EE_Form_Input_Base
265
	 * @throws EE_Error
266
	 */
267
	public function get_input($name, $require_construction_to_be_finalized = TRUE ){
268
		$subsection = $this->get_subsection($name, $require_construction_to_be_finalized);
269
		if( ! $subsection instanceof EE_Form_Input_Base){
270
			throw new EE_Error(sprintf(__("Subsection '%s' is not an instanceof EE_Form_Input_Base on form '%s'. It is a '%s'", 'event_espresso'),$name, get_class($this),$subsection ? get_class($subsection) : __("NULL", 'event_espresso')));
271
		}
272
		return $subsection;
273
	}
274
275
276

core/db_models/EEM_Base.model.php 1 location

@@ 4085-4101 (lines=17) @@
4082
	 * @throws EE_Error
4083
	 * @return mixed whatever the plugin which calls add_filter decides
4084
	 */
4085
	public function __call($methodName,$args){
4086
		$className=get_class($this);
4087
		$tagName="FHEE__{$className}__{$methodName}";
4088
		if(!has_filter($tagName)){
4089
			throw new EE_Error(
4090
				sprintf(
4091
					__( 'Method %1$s on model %2$s does not exist! You can create one with the following code in functions.php or in a plugin: %4$s function my_callback(%4$s \$previousReturnValue, EEM_Base \$object\ $argsArray=NULL ){%4$s     /*function body*/%4$s      return \$whatever;%4$s }%4$s add_filter( \'%3$s\', \'my_callback\', 10, 3 );', 'event_espresso' ),
4092
					$methodName,
4093
					$className,
4094
					$tagName,
4095
					'<br />'
4096
				)
4097
			);
4098
		}
4099
4100
		return apply_filters($tagName,null,$this,$args);
4101
	}
4102
4103
4104