Code Duplication    Length = 13-13 lines in 2 locations

sync/class.jetpack-sync-functions.php 1 location

@@ 30-42 (lines=13) @@
27
	 * Finds out if a site is using a version control system.
28
	 * @return string ( '1' | '0' )
29
	 **/
30
	public static function is_version_controlled() {
31
32
		if ( ! class_exists( 'WP_Automatic_Updater' ) ) {
33
			require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
34
		}
35
		$updater               = new WP_Automatic_Updater();
36
		$is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) );
37
		// transients should not be empty
38
		if ( empty( $is_version_controlled ) ) {
39
			$is_version_controlled = '0';
40
		}
41
42
		return $is_version_controlled;
43
	}
44
45
	/**

class.jetpack.php 1 location

@@ 1069-1081 (lines=13) @@
1066
	 * Finds out if a site is using a version control system.
1067
	 * @return string ( '1' | '0' )
1068
	 **/
1069
	public static function is_version_controlled() {
1070
1071
		if ( !class_exists( 'WP_Automatic_Updater' ) ) {
1072
			require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
1073
		}
1074
		$updater = new WP_Automatic_Updater();
1075
		$is_version_controlled = strval( $updater->is_vcs_checkout( $context = ABSPATH ) );
1076
		// transients should not be empty
1077
		if ( empty( $is_version_controlled ) ) {
1078
			$is_version_controlled = '0';
1079
		}
1080
		return $is_version_controlled;
1081
	}
1082
1083
	/**
1084
	 * Determines whether the current theme supports featured images or not.