Code Duplication    Length = 3-6 lines in 2 locations

json-endpoints/class.wpcom-json-api-get-site-endpoint.php 2 locations

@@ 79-84 (lines=6) @@
76
		$is_jetpack = true === apply_filters( 'is_jetpack_site', false, $blog_id );
77
		$site_url = get_option( 'siteurl' );
78
79
		if ( $is_jetpack ) {
80
			remove_filter( 'option_stylesheet', 'fix_theme_location' );
81
			if ( 'https' !== parse_url( $site_url, PHP_URL_SCHEME ) ) {
82
				add_filter( 'set_url_scheme', array( $this, 'force_http' ), 10, 3 );
83
			}
84
		}
85
		foreach ( array_keys( $response_format ) as $key ) {
86
			switch ( $key ) {
87
			case 'ID' :
@@ 425-427 (lines=3) @@
422
			}
423
424
			add_filter( 'option_stylesheet', 'fix_theme_location' );
425
			if ( 'https' !== parse_url( $site_url, PHP_URL_SCHEME ) ) {
426
				remove_filter( 'set_url_scheme', array( $this, 'force_http' ), 10, 3 );
427
			}
428
		}
429
430
		return $response;