Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 383-385 (lines=3) @@
380
381
			$taxonomy = $tax_query['taxonomy'];
382
383
			if ( ! isset( $args[ $taxonomy ] ) || ! is_array( $args[ $taxonomy ] ) ) {
384
				$args[ $taxonomy ] = array();
385
			}
386
387
			$args[ $taxonomy ] = array_merge( $args[ $taxonomy ], $tax_query['terms'] );
388
		}

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

@@ 378-380 (lines=3) @@
375
		/* add terms by ID */
376
		foreach ( $input['terms_by_id'] as $taxonomy => $terms ) {
377
			// combine with any previous selections
378
			if ( ! isset( $tax_input[ $taxonomy ] ) || ! is_array( $tax_input[ $taxonomy ] ) ) {
379
				$tax_input[ $taxonomy ] = array();
380
			}
381
382
			$is_hierarchical = is_taxonomy_hierarchical( $taxonomy );
383