Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 223-234 (lines=12) @@
220
		);
221
		return in_array( $origin, $whitelist ) ? $origin : 'https://wordpress.com';
222
223
		function get_site_suffix() {
224
			if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) {
225
				$site_suffix = Jetpack::build_raw_urls( home_url() );
226
			} elseif ( class_exists( 'WPCOM_Masterbar' ) && method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) {
227
				$site_suffix = WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() );
228
			}
229
230
			if ( $site_suffix ) {
231
				return "/${site_suffix}";
232
			}
233
			return '';
234
		}
235
	}
236
237
	/**
@@ 245-256 (lines=12) @@
242
	 *
243
	 * @return string
244
	 */
245
	private function get_site_suffix() {
246
		if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) {
247
			$site_suffix = Jetpack::build_raw_urls( home_url() );
248
		} elseif ( class_exists( 'WPCOM_Masterbar' ) && method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) {
249
			$site_suffix = WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() );
250
		}
251
252
		if ( $site_suffix ) {
253
			return "/${site_suffix}";
254
		}
255
		return '';
256
	}
257
258
	/**
259
	 * Returns the Calypso URL that displays either the current post type list (if no args