Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 311-317 (lines=7) @@
308
	 * @return EE_Form_Section_Proper
309
	 * @throws EE_Error
310
	 */
311
	public function get_proper_subsection($name, $require_construction_to_be_finalized = TRUE ){
312
		$subsection = $this->get_subsection( $name, $require_construction_to_be_finalized );
313
		if( ! $subsection instanceof EE_Form_Section_Proper){
314
			throw new EE_Error(sprintf(__("Subsection '%'s is not an instanceof EE_Form_Section_Proper on form '%s'", 'event_espresso'),$name, get_class($this)));
315
		}
316
		return $subsection;
317
	}
318
319
320

core/db_models/EEM_Base.model.php 1 location

@@ 3858-3864 (lines=7) @@
3855
	 * @throws EE_Error
3856
	 * @return EE_Model_Field_Base
3857
	 */
3858
	public function field_settings_for($fieldName){
3859
		$fieldSettings=$this->field_settings(true);
3860
		if( ! array_key_exists($fieldName,$fieldSettings)){
3861
			throw new EE_Error(sprintf(__("There is no field/column '%s' on '%s'",'event_espresso'),$fieldName,get_class($this)));
3862
		}
3863
		return $fieldSettings[$fieldName];
3864
	}
3865
3866
	/**
3867
	 * Checks if this field exists on this model