Code Duplication    Length = 3-10 lines in 3 locations

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

@@ 429-431 (lines=3) @@
426
		$params = $data->get_json_params();
427
428
		// Exit if no parameters were passed.
429
		if ( ! is_array( $params ) ) {
430
			return new WP_Error( 'missing_options', esc_html__( 'Missing options.', 'jetpack' ), array( 'status' => 404 ) );
431
		}
432
433
		// Get available module options.
434
		$options = Jetpack_Core_Json_Api_Endpoints::get_updateable_data_list( 'any' === $data['slug']
@@ 1027-1036 (lines=10) @@
1024
		}
1025
1026
		$verification_services_codes = get_option( 'verification_services_codes' );
1027
		if (
1028
			! is_array( $verification_services_codes )
1029
			|| empty( $verification_services_codes )
1030
		) {
1031
			return new WP_Error(
1032
				'empty',
1033
				esc_html__( 'Site not verified with any service.', 'jetpack' ),
1034
				array( 'status' => 404 )
1035
			);
1036
		}
1037
1038
		$services = array();
1039
		foreach ( jetpack_verification_services() as $name => $service ) {

_inc/lib/class.core-rest-api-endpoints.php 1 location

@@ 618-620 (lines=3) @@
615
		$param = $data->get_json_params();
616
617
		// Exit if no parameters were passed.
618
		if ( ! is_array( $param ) ) {
619
			return new WP_Error( 'missing_setting', esc_html__( 'Missing setting.', 'jetpack' ), array( 'status' => 404 ) );
620
		}
621
622
		// Get option name and value.
623
		$option = key( $param );