Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 399-401 (lines=3) @@
396
		/* add terms by ID */
397
		foreach ( $input['terms_by_id'] as $taxonomy => $terms ) {
398
			// combine with any previous selections
399
			if ( ! isset( $tax_input[ $taxonomy ] ) || ! is_array( $tax_input[ $taxonomy ] ) ) {
400
				$tax_input[ $taxonomy ] = array();
401
			}
402
403
			$is_hierarchical = is_taxonomy_hierarchical( $taxonomy );
404

projects/plugins/jetpack/modules/search/class.jetpack-search.php 1 location

@@ 742-744 (lines=3) @@
739
740
			$taxonomy = $tax_query['taxonomy'];
741
742
			if ( ! isset( $args[ $taxonomy ] ) || ! is_array( $args[ $taxonomy ] ) ) {
743
				$args[ $taxonomy ] = array();
744
			}
745
746
			$args[ $taxonomy ] = array_merge( $args[ $taxonomy ], $tax_query['terms'] );
747
		}