Return types
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user