Code Duplication    Length = 3-3 lines in 2 locations

_inc/lib/class.core-rest-api-endpoints.php 2 locations

@@ 1038-1040 (lines=3) @@
1035
		$options = self::get_module_available_options();
1036
1037
		// If option is invalid, don't go any further.
1038
		if ( ! in_array( $option, array_keys( $options ) ) ) {
1039
			return new WP_Error( 'invalid_param', esc_html(	sprintf( __( 'The option %s is invalid for this module.', 'jetpack' ), $option ) ), array( 'status' => 404 ) );
1040
		}
1041
1042
		// Used if response is successful. The message can be overwritten and additional data can be added here.
1043
		$response = array(
@@ 2573-2575 (lines=3) @@
2570
2571
		$plugin = stripslashes( $data['plugin'] );
2572
2573
		if ( ! in_array( $plugin, array_keys( $plugins ) ) ) {
2574
			return new WP_Error( 'plugin_not_found', esc_html( sprintf( __( 'Plugin %s is not installed.', 'jetpack' ), $plugin ) ), array( 'status' => 404 ) );
2575
		}
2576
2577
		$plugin_data = $plugins[ $plugin ];
2578