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

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