Code Duplication    Length = 8-8 lines in 2 locations

projects/packages/sync/src/class-endpoints.php 1 location

@@ 315-322 (lines=8) @@
312
	 */
313
	public static function sync_health( $request ) {
314
315
		switch ( $request->get_param( 'status' ) ) {
316
			case Health::STATUS_IN_SYNC:
317
			case Health::STATUS_OUT_OF_SYNC:
318
				Health::update_status( $request->get_param( 'status' ) );
319
				break;
320
			default:
321
				return new WP_Error( 'invalid_status', 'Invalid Sync Status Provided.' );
322
		}
323
324
		// re-fetch so we see what's really being stored.
325
		return rest_ensure_response(

projects/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php 1 location

@@ 139-146 (lines=8) @@
136
	protected function result() {
137
		$args = $this->input();
138
139
		switch ( $args['status'] ) {
140
			case Health::STATUS_IN_SYNC:
141
			case Health::STATUS_OUT_OF_SYNC:
142
				Health::update_status( $args['status'] );
143
				break;
144
			default:
145
				return new WP_Error( 'invalid_status', 'Invalid Sync Status Provided.' );
146
		}
147
148
		// re-fetch so we see what's really being stored.
149
		return array(