Code Duplication    Length = 4-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 1054-1057 (lines=4) @@
1051
	public static function is_single_user_site() {
1052
		global $wpdb;
1053
1054
		if ( false === ( $some_users = get_transient( 'jetpack_is_single_user' ) ) ) {
1055
			$some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" );
1056
			set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS );
1057
		}
1058
		return 1 === (int) $some_users;
1059
	}
1060
@@ 2862-2866 (lines=5) @@
2859
				return -1; // Not a real value but should tell us that we are dealing with a large network.
2860
			}
2861
		}
2862
		if ( false === ( $user_count = get_transient( 'jetpack_site_user_count' ) ) ) {
2863
			// It wasn't there, so regenerate the data and save the transient
2864
			$user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities'" );
2865
			set_transient( 'jetpack_site_user_count', $user_count, DAY_IN_SECONDS );
2866
		}
2867
		return $user_count;
2868
	}
2869