Code Duplication    Length = 3-3 lines in 2 locations

json-endpoints/class.wpcom-json-api-update-term-endpoint.php 2 locations

@@ 181-183 (lines=3) @@
178
		}
179
180
		$update = array();
181
		if ( ! empty( $input['parent'] ) || is_taxonomy_hierarchical( $taxonomy ) ) {
182
			$update['parent'] = $input['parent'];
183
		}
184
185
		if ( isset( $input['description'] ) ) {
186
			$update['description'] = addslashes( $input['description'] );
@@ 130-132 (lines=3) @@
127
			return new WP_Error( 'unauthorized', 'User cannot edit taxonomy', 403 );
128
		}
129
130
		if ( ! isset( $input['parent'] ) || ! is_taxonomy_hierarchical( $taxonomy ) ) {
131
			$input['parent'] = 0;
132
		}
133
134
		if ( $term = get_term_by( 'name', $input['name'], $taxonomy ) ) {
135
			// the same name is allowed as long as the parents are different