Code Duplication    Length = 5-5 lines in 2 locations

core/db_classes/EE_Base_Class.class.php 2 locations

@@ 241-245 (lines=5) @@
238
		$field_obj = $this->get_model()->field_settings_for( $field_name );
239
		if ( $field_obj instanceof EE_Model_Field_Base ) {
240
//			if ( method_exists( $field_obj, 'set_timezone' )) {
241
			if ( $field_obj instanceof EE_Datetime_Field ) {
242
				$field_obj->set_timezone( $this->_timezone );
243
				$field_obj->set_date_format( $this->_dt_frmt );
244
				$field_obj->set_time_format( $this->_tm_frmt );
245
			}
246
247
			$holder_of_value = $field_obj->prepare_for_set($field_value);
248
			//should the value be null?
@@ 557-561 (lines=5) @@
554
			 * maybe this is EE_Datetime_Field.  If so we need to make sure timezone and
555
			 * formats are correct.
556
			 */
557
			if ( $field_obj instanceof EE_Datetime_Field ) {
558
				$field_obj->set_timezone( $this->_timezone );
559
				$field_obj->set_date_format( $this->_dt_frmt, $pretty );
560
				$field_obj->set_time_format( $this->_tm_frmt, $pretty );
561
			}
562
563
			if( ! isset($this->_fields[$fieldname])){
564
				$this->_fields[$fieldname] = NULL;