Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 677-686 (lines=10) @@
674
					$updated = $grouped_options_current != $grouped_options ? update_option( 'verification_services_codes', $grouped_options ) : true;
675
					break;
676
677
				case 'sharing_services':
678
					if ( ! class_exists( 'Sharing_Service' ) && ! include_once( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
679
						break;
680
					}
681
682
					$sharer = new Sharing_Service();
683
684
					// If option value was the same, consider it done.
685
					$updated = $value != $sharer->get_blog_services() ? $sharer->set_blog_services( $value['visible'], $value['hidden'] ) : true;
686
					break;
687
688
				case 'button_style':
689
				case 'sharing_label':

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

@@ 2292-2300 (lines=9) @@
2289
				$options[ 'google_analytics_tracking_id' ][ 'current_value' ] = $code;
2290
				break;
2291
2292
			case 'sharedaddy':
2293
				// It's local, but it must be broken apart since it's saved as an array.
2294
				if ( ! class_exists( 'Sharing_Service' ) && ! include_once( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
2295
					break;
2296
				}
2297
				$sharer = new Sharing_Service();
2298
				$options = self::split_options( $options, $sharer->get_global_options() );
2299
				$options['sharing_services']['current_value'] = $sharer->get_blog_services();
2300
				break;
2301
2302
			case 'after-the-deadline':
2303
				if ( ! function_exists( 'AtD_get_options' ) ) {