Updated Formatting

This commit is contained in:
netkas 2025-01-22 15:36:12 -05:00
parent 3bb5f2788e
commit 2933b5435f

View file

@ -239,7 +239,7 @@
* @return array An array of ContactRecord instances representing the contacts for the given peer.
* @throws DatabaseOperationException If the database query fails.
*/
public static function getContacts(string $peerUuid, int $limit = 100, int $page = 1): array
public static function getContacts(string $peerUuid, int $limit=100, int $page=1): array
{
if ($page < 1)
{
@ -252,9 +252,10 @@
}
$contacts = [];
try
{
$statement = Database::getConnection()->prepare("SELECT * FROM contacts WHERE peer_uuid = :peer ORDER BY created DESC LIMIT :limit OFFSET :offset");
$statement = Database::getConnection()->prepare("SELECT * FROM contacts WHERE peer_uuid=:peer ORDER BY created DESC LIMIT :limit OFFSET :offset");
$offset = ($page - 1) * $limit;
$statement->bindParam(':peer', $peerUuid);
$statement->bindParam(':limit', $limit, PDO::PARAM_INT);