Code Duplication    Length = 8-8 lines in 2 locations

includes/abstracts/abstract-wc-rest-terms-controller.php 2 locations

@@ 665-672 (lines=8) @@
662
			'default'            => array(),
663
			'sanitize_callback'  => 'wp_parse_id_list',
664
		);
665
		if ( ! $taxonomy->hierarchical ) {
666
			$params['offset'] = array(
667
				'description'        => __( 'Offset the result set by a specific number of items.', 'woocommerce' ),
668
				'type'               => 'integer',
669
				'sanitize_callback'  => 'absint',
670
				'validate_callback'  => 'rest_validate_request_arg',
671
			);
672
		}
673
		$params['order']      = array(
674
			'description'           => __( 'Order sort attribute ascending or descending.', 'woocommerce' ),
675
			'type'                  => 'string',
@@ 706-713 (lines=8) @@
703
			'default'               => false,
704
			'validate_callback'     => 'rest_validate_request_arg',
705
		);
706
		if ( $taxonomy->hierarchical ) {
707
			$params['parent'] = array(
708
				'description'        => __( 'Limit result set to resources assigned to a specific parent.', 'woocommerce' ),
709
				'type'               => 'integer',
710
				'sanitize_callback'  => 'absint',
711
				'validate_callback'  => 'rest_validate_request_arg',
712
			);
713
		}
714
		$params['product'] = array(
715
			'description'           => __( 'Limit result set to resources assigned to a specific product.', 'woocommerce' ),
716
			'type'                  => 'integer',