Code Duplication    Length = 4-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 3484-3488 (lines=5) @@
3481
				return -1; // Not a real value but should tell us that we are dealing with a large network.
3482
			}
3483
		}
3484
		if ( false === ( $user_count = get_transient( 'jetpack_site_user_count' ) ) ) {
3485
			// It wasn't there, so regenerate the data and save the transient
3486
			$user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities'" );
3487
			set_transient( 'jetpack_site_user_count', $user_count, DAY_IN_SECONDS );
3488
		}
3489
		return $user_count;
3490
	}
3491
@@ 1407-1410 (lines=4) @@
1404
	public static function is_single_user_site() {
1405
		global $wpdb;
1406
1407
		if ( false === ( $some_users = get_transient( 'jetpack_is_single_user' ) ) ) {
1408
			$some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" );
1409
			set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS );
1410
		}
1411
		return 1 === (int) $some_users;
1412
	}
1413