Code Duplication    Length = 5-10 lines in 2 locations

classes/Pods.php 2 locations

@@ 2969-2973 (lines=5) @@
2966
				return $id;
2967
			}
2968
		} // Number fields
2969
		elseif ( in_array( $this->fields[ $field ]['type'], PodsForm::number_field_types(), true ) ) {
2970
			$current_value = (float) $pod->raw( $field );
2971
2972
			$value = ( $current_value + (float) $value );
2973
		} // Date fields
2974
		elseif ( in_array( $this->fields[ $field ]['type'], PodsForm::date_field_types(), true ) ) {
2975
			$current_value = $pod->raw( $field );
2976
@@ 3100-3109 (lines=10) @@
3097
				}
3098
			}
3099
		} // Number fields
3100
		elseif ( in_array( $this->fields[ $field ]['type'], PodsForm::number_field_types(), true ) ) {
3101
			// Date fields don't support empty for removing
3102
			if ( empty( $value ) ) {
3103
				return $id;
3104
			}
3105
3106
			$current_value = (float) $pod->raw( $field );
3107
3108
			$value = ( $current_value - (float) $value );
3109
		} // Date fields
3110
		elseif ( in_array( $this->fields[ $field ]['type'], PodsForm::date_field_types(), true ) ) {
3111
			// Date fields don't support empty for removing
3112
			if ( empty( $value ) ) {