Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 653-662 (lines=10) @@
650
					$updated = $grouped_options_current != $grouped_options ? update_option( 'verification_services_codes', $grouped_options ) : true;
651
					break;
652
653
				case 'sharing_services':
654
					if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
655
						break;
656
					}
657
658
					$sharer = new Sharing_Service();
659
660
					// If option value was the same, consider it done.
661
					$updated = $value != $sharer->get_blog_services() ? $sharer->set_blog_services( $value['visible'], $value['hidden'] ) : true;
662
					break;
663
664
				case 'button_style':
665
				case 'sharing_label':

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

@@ 2145-2153 (lines=9) @@
2142
				$options[ 'google_analytics_tracking_id' ][ 'current_value' ] = $code;
2143
				break;
2144
2145
			case 'sharedaddy':
2146
				// It's local, but it must be broken apart since it's saved as an array.
2147
				if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
2148
					break;
2149
				}
2150
				$sharer = new Sharing_Service();
2151
				$options = self::split_options( $options, $sharer->get_global_options() );
2152
				$options['sharing_services']['current_value'] = $sharer->get_blog_services();
2153
				break;
2154
2155
			case 'after-the-deadline':
2156
				if ( ! function_exists( 'AtD_get_options' ) ) {