Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 583-592 (lines=10) @@
580
					$updated = $grouped_options_current != $grouped_options ? update_option( 'verification_services_codes', $grouped_options ) : true;
581
					break;
582
583
				case 'sharing_services':
584
					if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
585
						break;
586
					}
587
588
					$sharer = new Sharing_Service();
589
590
					// If option value was the same, consider it done.
591
					$updated = $value != $sharer->get_blog_services() ? $sharer->set_blog_services( $value['visible'], $value['hidden'] ) : true;
592
					break;
593
594
				case 'button_style':
595
				case 'sharing_label':

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

@@ 2030-2038 (lines=9) @@
2027
				$options = self::split_options( $options, get_option( 'verification_services_codes' ) );
2028
				break;
2029
2030
			case 'sharedaddy':
2031
				// It's local, but it must be broken apart since it's saved as an array.
2032
				if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
2033
					break;
2034
				}
2035
				$sharer = new Sharing_Service();
2036
				$options = self::split_options( $options, $sharer->get_global_options() );
2037
				$options['sharing_services']['current_value'] = $sharer->get_blog_services();
2038
				break;
2039
2040
			case 'after-the-deadline':
2041
				if ( ! function_exists( 'AtD_get_options' ) ) {