Code Duplication    Length = 5-5 lines in 2 locations

json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php 1 location

@@ 191-195 (lines=5) @@
188
			}
189
190
			$terms = $input[ $taxonomy_key ];
191
			if ( is_string( $terms ) ) {
192
				$terms = explode( ',', $terms );
193
			} else if ( ! is_array( $terms ) ) {
194
				continue;
195
			}
196
197
			$input['terms'][ $taxonomy ] = array_merge(
198
				$input['terms'][ $taxonomy ],

json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php 1 location

@@ 172-176 (lines=5) @@
169
				}
170
171
				$terms = $input[ $taxonomy_key ];
172
				if ( is_string( $terms ) ) {
173
					$terms = explode( ',', $terms );
174
				} else if ( ! is_array( $terms ) ) {
175
					continue;
176
				}
177
178
				$input[ $term_input_key ][ $taxonomy ] = array_merge(
179
					$input[ $term_input_key ][ $taxonomy ],