Code Duplication    Length = 9-10 lines in 2 locations

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

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

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

@@ 2099-2107 (lines=9) @@
2096
				$options[ 'google_analytics_tracking_id' ][ 'current_value' ] = $code;
2097
				break;
2098
2099
			case 'sharedaddy':
2100
				// It's local, but it must be broken apart since it's saved as an array.
2101
				if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
2102
					break;
2103
				}
2104
				$sharer = new Sharing_Service();
2105
				$options = self::split_options( $options, $sharer->get_global_options() );
2106
				$options['sharing_services']['current_value'] = $sharer->get_blog_services();
2107
				break;
2108
2109
			case 'after-the-deadline':
2110
				if ( ! function_exists( 'AtD_get_options' ) ) {