Code Duplication    Length = 10-10 lines in 2 locations

core/Datastore/Key_Value_Datastore.php 1 location

@@ 165-174 (lines=10) @@
162
			return;
163
		}
164
165
		if ( empty( $value_set ) && $field->value()->keepalive() ) {
166
			$storage_key = $this->key_toolset->get_storage_key(
167
				$field->is_simple_root_field(),
168
				$this->get_full_hierarchy_for_field( $field ),
169
				$this->get_full_hierarchy_index_for_field( $field ),
170
				0,
171
				static::KEEPALIVE_KEY
172
			);
173
			$this->save_key_value_pair( $storage_key, '' );
174
		}
175
		foreach ( $value_set as $value_group_index => $values ) {
176
			foreach ( $values as $value_key => $value ) {
177
				$storage_key = $this->key_toolset->get_storage_key(

core/Datastore/Theme_Options_Datastore.php 1 location

@@ 81-90 (lines=10) @@
78
			return;
79
		}
80
81
		if ( empty( $value_set ) && $field->value()->keepalive() ) {
82
			$storage_key = $this->key_toolset->get_storage_key(
83
				$field->is_simple_root_field(),
84
				$this->get_full_hierarchy_for_field( $field ),
85
				$this->get_full_hierarchy_index_for_field( $field ),
86
				0,
87
				static::KEEPALIVE_KEY
88
			);
89
			$this->save_key_value_pair_with_autoload( $storage_key, '', $autoload );
90
		}
91
		foreach ( $value_set as $value_group_index => $values ) {
92
			foreach ( $values as $value_key => $value ) {
93
				$storage_key = $this->key_toolset->get_storage_key(