Code Duplication    Length = 3-3 lines in 2 locations

projects/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php 2 locations

@@ 59-61 (lines=3) @@
56
			return new WP_Error( 'invalid_queue', 'Queue name is required', 400 );
57
		}
58
59
		if ( ! in_array( $query, array( 'sync', 'full_sync', 'immediate' ) ) ) {
60
			return new WP_Error( 'invalid_queue', 'Queue name should be sync, full_sync or immediate', 400 );
61
		}
62
		return $query;
63
	}
64
}
@@ 463-465 (lines=3) @@
460
			return new WP_Error( 'invalid_queue', 'Queue name is required', 400 );
461
		}
462
463
		if ( ! in_array( $args['queue'], array( 'sync', 'full_sync' ) ) ) {
464
			return new WP_Error( 'invalid_queue', 'Queue name should be sync or full_sync', 400 );
465
		}
466
467
		$queue = new Queue( $args['queue'] );
468