Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 600-609 (lines=10) @@
597
					$updated = $grouped_options_current != $grouped_options ? update_option( 'verification_services_codes', $grouped_options ) : true;
598
					break;
599
600
				case 'sharing_services':
601
					if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
602
						break;
603
					}
604
605
					$sharer = new Sharing_Service();
606
607
					// If option value was the same, consider it done.
608
					$updated = $value != $sharer->get_blog_services() ? $sharer->set_blog_services( $value['visible'], $value['hidden'] ) : true;
609
					break;
610
611
				case 'button_style':
612
				case 'sharing_label':

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

@@ 2116-2124 (lines=9) @@
2113
				$options[ 'google_analytics_tracking_id' ][ 'current_value' ] = $code;
2114
				break;
2115
2116
			case 'sharedaddy':
2117
				// It's local, but it must be broken apart since it's saved as an array.
2118
				if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
2119
					break;
2120
				}
2121
				$sharer = new Sharing_Service();
2122
				$options = self::split_options( $options, $sharer->get_global_options() );
2123
				$options['sharing_services']['current_value'] = $sharer->get_blog_services();
2124
				break;
2125
2126
			case 'after-the-deadline':
2127
				if ( ! function_exists( 'AtD_get_options' ) ) {