Code Duplication    Length = 4-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 3082-3086 (lines=5) @@
3079
				return -1; // Not a real value but should tell us that we are dealing with a large network.
3080
			}
3081
		}
3082
		if ( false === ( $user_count = get_transient( 'jetpack_site_user_count' ) ) ) {
3083
			// It wasn't there, so regenerate the data and save the transient
3084
			$user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities'" );
3085
			set_transient( 'jetpack_site_user_count', $user_count, DAY_IN_SECONDS );
3086
		}
3087
		return $user_count;
3088
	}
3089
@@ 1104-1107 (lines=4) @@
1101
	public static function is_single_user_site() {
1102
		global $wpdb;
1103
1104
		if ( false === ( $some_users = get_transient( 'jetpack_is_single_user' ) ) ) {
1105
			$some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" );
1106
			set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS );
1107
		}
1108
		return 1 === (int) $some_users;
1109
	}
1110