Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 1968-1976 (lines=9) @@
1965
				$options = self::split_options( $options, get_option( 'verification_services_codes' ) );
1966
				break;
1967
1968
			case 'sharedaddy':
1969
				// It's local, but it must be broken apart since it's saved as an array.
1970
				if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharedaddy/sharing-service.php' ) ) {
1971
					break;
1972
				}
1973
				$sharer = new Sharing_Service();
1974
				$options = self::split_options( $options, $sharer->get_global_options() );
1975
				$options['sharing_services']['current_value'] = $sharer->get_blog_services();
1976
				break;
1977
1978
			case 'site-icon':
1979
				// Return site icon ID and URL to make it more complete.

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

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