Code Duplication    Length = 5-6 lines in 2 locations

packages/sync/src/modules/Terms.php 2 locations

@@ 73-78 (lines=6) @@
70
		if ( 'term' === $object_type ) {
71
			$object = get_term( intval( $id ) );
72
73
			if ( is_wp_error( $object ) && $object->get_error_code() === 'invalid_taxonomy' ) {
74
				// Fetch raw term.
75
				$columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_checksum_columns, array( 'term_group' ) ) ) );
76
				// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
77
				$object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->terms WHERE term_id = %d", $id ) );
78
			}
79
		}
80
81
		if ( 'term_taxonomy' === $object_type ) {
@@ 81-85 (lines=5) @@
78
			}
79
		}
80
81
		if ( 'term_taxonomy' === $object_type ) {
82
			$columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_taxonomy_checksum_columns, array( 'description' ) ) ) );
83
			// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
84
			$object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $id ) );
85
		}
86
87
		if ( 'term_relationships' === $object_type ) {
88
			$columns = implode( ', ', Defaults::$default_term_relationships_checksum_columns );