Code Duplication    Length = 7-17 lines in 2 locations

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

@@ 290-296 (lines=7) @@
287
	 * @return EE_Form_Input_Base
288
	 * @throws EE_Error
289
	 */
290
	public function get_input($name, $require_construction_to_be_finalized = TRUE ){
291
		$subsection = $this->get_subsection($name, $require_construction_to_be_finalized);
292
		if( ! $subsection instanceof EE_Form_Input_Base){
293
			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')));
294
		}
295
		return $subsection;
296
	}
297
298
299

core/db_models/EEM_Base.model.php 1 location

@@ 4415-4431 (lines=17) @@
4412
	 * @throws EE_Error
4413
	 * @return mixed whatever the plugin which calls add_filter decides
4414
	 */
4415
	public function __call($methodName,$args){
4416
		$className=get_class($this);
4417
		$tagName="FHEE__{$className}__{$methodName}";
4418
		if(!has_filter($tagName)){
4419
			throw new EE_Error(
4420
				sprintf(
4421
					__( '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' ),
4422
					$methodName,
4423
					$className,
4424
					$tagName,
4425
					'<br />'
4426
				)
4427
			);
4428
		}
4429
4430
		return apply_filters($tagName,null,$this,$args);
4431
	}
4432
4433
4434