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

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