Return types

This commit is contained in:
2024-07-22 02:36:28 +02:00
parent af588ab174
commit 2168e37413
12 changed files with 35 additions and 46 deletions
+7 -3
View File
@@ -155,7 +155,7 @@ class User implements JsonSerializable
}
}
public static function create(string $username, string $email, string $password)
public static function create(string $username, string $email, string $password): bool
{
$db = Database::getInstance();
$guid = GUID::v4();
@@ -186,6 +186,10 @@ class User implements JsonSerializable
throw $err;
}
}
public static function confirm(string $confirmCode): bool
{
}
/*
* Members
*/
@@ -198,7 +202,7 @@ class User implements JsonSerializable
return $stmt->execute();
}
public function update(?string $username, ?string $password, $image = null)
public function update(?string $username, ?string $password, $image = null): bool
{
$db = Database::getInstance();
@@ -233,7 +237,7 @@ class User implements JsonSerializable
return true;
}
public function delete()
public function delete(): bool
{
$db = Database::getInstance();
$stmt = $db->prepare("DELETE FROM egb_benutzer WHERE id = :ID");