Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 414-420 (lines=7) @@
411
	 * @return EE_Form_Section_Proper
412
	 * @throws EE_Error
413
	 */
414
	public function get_proper_subsection($name, $require_construction_to_be_finalized = TRUE ){
415
		$subsection = $this->get_subsection( $name, $require_construction_to_be_finalized );
416
		if( ! $subsection instanceof EE_Form_Section_Proper){
417
			throw new EE_Error(
418
				sprintf(
419
					__( "Subsection '%'s is not an instanceof EE_Form_Section_Proper on form '%s'", 'event_espresso' ),
420
					$name,
421
					get_class( $this )
422
				)
423
			);

core/db_models/EEM_Base.model.php 1 location

@@ 3894-3900 (lines=7) @@
3891
	 * @throws EE_Error
3892
	 * @return EE_Model_Field_Base
3893
	 */
3894
	public function field_settings_for($fieldName){
3895
		$fieldSettings=$this->field_settings(true);
3896
		if( ! array_key_exists($fieldName,$fieldSettings)){
3897
			throw new EE_Error(sprintf(__("There is no field/column '%s' on '%s'",'event_espresso'),$fieldName,get_class($this)));
3898
		}
3899
		return $fieldSettings[$fieldName];
3900
	}
3901
3902
	/**
3903
	 * Checks if this field exists on this model