Code Duplication    Length = 7-17 lines in 2 locations

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,

core/db_models/EEM_Base.model.php 1 location

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