comments in controllers hinzugefügt + review + testing

This commit is contained in:
arslandevelopments
2026-08-19 14:01:43 +02:00
parent 6e1dcd9d1c
commit f91feadedf
5 changed files with 30 additions and 7 deletions
Regular → Executable
View File
Regular → Executable
+4 -1
View File
@@ -31,6 +31,7 @@ class Reminder
return $statement->fetchAll();
}
// Legt eine Erinnerung an
public static function createForHabit(int $habitId, int $userId, array $data): bool
{
$statement = Database::connection()->prepare(
@@ -50,6 +51,7 @@ class Reminder
return $statement->rowCount() === 1;
}
// Aktualisiert eine Erinnerung
public static function update(int $id, int $userId, array $data): bool
{
$statement = Database::connection()->prepare(
@@ -82,6 +84,7 @@ class Reminder
return $statement->execute(['id' => $id, 'user_id' => $userId]);
}
// Schaltet zwischen aktiv und pausiert um
public static function toggle(int $id, int $userId): bool
{
$statement = Database::connection()->prepare(
@@ -93,4 +96,4 @@ class Reminder
return $statement->execute(['id' => $id, 'user_id' => $userId]);
}
}
}