Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 429-436 (lines=8) @@
426
	 */
427
	public static function sync_health( $request ) {
428
429
		switch ( $request->get_param( 'status' ) ) {
430
			case Health::STATUS_IN_SYNC:
431
			case Health::STATUS_OUT_OF_SYNC:
432
				Health::update_status( $request->get_param( 'status' ) );
433
				break;
434
			default:
435
				return new WP_Error( 'invalid_status', 'Invalid Sync Status Provided.' );
436
		}
437
438
		// re-fetch so we see what's really being stored.
439
		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(