Code Duplication    Length = 3-10 lines in 2 locations

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

@@ 626-628 (lines=3) @@
623
		$param = $data->get_json_params();
624
625
		// Exit if no parameters were passed.
626
		if ( ! is_array( $param ) ) {
627
			return new WP_Error( 'missing_setting', esc_html__( 'Missing setting.', 'jetpack' ), array( 'status' => 404 ) );
628
		}
629
630
		// Get option name and value.
631
		$option = key( $param );

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

@@ 978-987 (lines=10) @@
975
		}
976
977
		$verification_services_codes = get_option( 'verification_services_codes' );
978
		if (
979
			! is_array( $verification_services_codes )
980
			|| empty( $verification_services_codes )
981
		) {
982
			return new WP_Error(
983
				'empty',
984
				esc_html__( 'Site not verified with any service.', 'jetpack' ),
985
				array( 'status' => 404 )
986
			);
987
		}
988
989
		$services = array();
990
		foreach ( jetpack_verification_services() as $name => $service ) {