Code Duplication    Length = 12-12 lines in 2 locations

modules/calypsoify/class.jetpack-calypsoify.php 2 locations

@@ 341-352 (lines=12) @@
338
		);
339
		return in_array( $origin, $whitelist ) ? $origin : 'https://wordpress.com';
340
341
		function get_site_suffix() {
342
			if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) {
343
				$site_suffix = Jetpack::build_raw_urls( home_url() );
344
			} elseif ( class_exists( 'WPCOM_Masterbar' ) && method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) {
345
				$site_suffix = WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() );
346
			}
347
348
			if ( $site_suffix ) {
349
				return "/${site_suffix}";
350
			}
351
			return '';
352
		}
353
	}
354
355
	/**
@@ 363-374 (lines=12) @@
360
	 *
361
	 * @return string
362
	 */
363
	private function get_site_suffix() {
364
		if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) {
365
			$site_suffix = Jetpack::build_raw_urls( home_url() );
366
		} elseif ( class_exists( 'WPCOM_Masterbar' ) && method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) {
367
			$site_suffix = WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() );
368
		}
369
370
		if ( $site_suffix ) {
371
			return "/${site_suffix}";
372
		}
373
		return '';
374
	}
375
376
	/**
377
	 * Returns the Calypso URL that displays either the current post type list (if no args