Code Duplication    Length = 4-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 1428-1431 (lines=4) @@
1425
	public static function is_single_user_site() {
1426
		global $wpdb;
1427
1428
		if ( false === ( $some_users = get_transient( 'jetpack_is_single_user' ) ) ) {
1429
			$some_users = $wpdb->get_var( "SELECT COUNT(*) FROM (SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' LIMIT 2) AS someusers" );
1430
			set_transient( 'jetpack_is_single_user', (int) $some_users, 12 * HOUR_IN_SECONDS );
1431
		}
1432
		return 1 === (int) $some_users;
1433
	}
1434
@@ 3509-3513 (lines=5) @@
3506
				return -1; // Not a real value but should tell us that we are dealing with a large network.
3507
			}
3508
		}
3509
		if ( false === ( $user_count = get_transient( 'jetpack_site_user_count' ) ) ) {
3510
			// It wasn't there, so regenerate the data and save the transient
3511
			$user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->usermeta WHERE meta_key = '{$wpdb->prefix}capabilities'" );
3512
			set_transient( 'jetpack_site_user_count', $user_count, DAY_IN_SECONDS );
3513
		}
3514
		return $user_count;
3515
	}
3516