Code Duplication    Length = 3-3 lines in 3 locations

_inc/lib/class.core-rest-api-endpoints.php 3 locations

@@ 1835-1837 (lines=3) @@
1832
			return true;
1833
		}
1834
1835
		if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharing/sharing-service.php' ) ) {
1836
			return new WP_Error( 'invalid_param', esc_html__( 'Failed loading required dependency Sharing_Service.', 'jetpack' ) );
1837
		}
1838
		$sharer = new Sharing_Service();
1839
		$services = array_keys( $sharer->get_all_services() );
1840
@@ 1872-1874 (lines=3) @@
1869
			return true;
1870
		}
1871
1872
		if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharing/sharing-service.php' ) ) {
1873
			return new WP_Error( 'invalid_param', esc_html__( 'Failed loading required dependency Sharing_Service.', 'jetpack' ) );
1874
		}
1875
1876
		if ( ( ! empty( $value['sharing_name'] ) && ! is_string( $value['sharing_name'] ) )
1877
		|| ( ! empty( $value['sharing_url'] ) && ! is_string( $value['sharing_url'] ) )
@@ 1900-1902 (lines=3) @@
1897
			return new WP_Error( 'invalid_param', sprintf( esc_html__( "%s must be a string prefixed with 'custom-' and followed by a numeric ID.", 'jetpack' ), $param ) );
1898
		}
1899
1900
		if ( ! class_exists( 'Sharing_Service' ) && ! @include( JETPACK__PLUGIN_DIR . 'modules/sharing/sharing-service.php' ) ) {
1901
			return new WP_Error( 'invalid_param', esc_html__( 'Failed loading required dependency Sharing_Service.', 'jetpack' ) );
1902
		}
1903
		$sharer = new Sharing_Service();
1904
		$services = array_keys( $sharer->get_all_services() );
1905