Code Duplication    Length = 7-17 lines in 2 locations

core/db_models/EEM_Base.model.php 1 location

@@ 4475-4491 (lines=17) @@
4472
	 * @throws EE_Error
4473
	 * @return mixed whatever the plugin which calls add_filter decides
4474
	 */
4475
	public function __call($methodName,$args){
4476
		$className=get_class($this);
4477
		$tagName="FHEE__{$className}__{$methodName}";
4478
		if(!has_filter($tagName)){
4479
			throw new EE_Error(
4480
				sprintf(
4481
					__( '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' ),
4482
					$methodName,
4483
					$className,
4484
					$tagName,
4485
					'<br />'
4486
				)
4487
			);
4488
		}
4489
4490
		return apply_filters($tagName,null,$this,$args);
4491
	}
4492
4493
4494

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

@@ 383-389 (lines=7) @@
380
	 * @return EE_Form_Input_Base
381
	 * @throws EE_Error
382
	 */
383
	public function get_input($name, $require_construction_to_be_finalized = TRUE ){
384
		$subsection = $this->get_subsection($name, $require_construction_to_be_finalized);
385
		if( ! $subsection instanceof EE_Form_Input_Base){
386
			throw new EE_Error(
387
				sprintf(
388
					__(
389
						"Subsection '%s' is not an instanceof EE_Form_Input_Base on form '%s'. It is a '%s'",
390
						'event_espresso'
391
					),
392
					$name,