1 | <?php |
||
8 | class UserRepository |
||
9 | { |
||
10 | /** |
||
11 | * Create a new user instance after a valid registration. |
||
12 | * |
||
13 | * @param array $data The data used to create the user. |
||
14 | * |
||
15 | * @return \Xetaravel\Models\User |
||
16 | */ |
||
17 | public static function create(array $data): User |
||
30 | |||
31 | /** |
||
32 | * Update the user's email after a valid email update. |
||
33 | * |
||
34 | * @param array $data The data used to update the user. |
||
35 | * @param \Xetaravel\Models\User $user The user to update. |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | public static function updateEmail(array $data, User $user): bool |
||
45 | |||
46 | /** |
||
47 | * Update the user's password after a valid password update. |
||
48 | * |
||
49 | * @param array $data The data used to update the user. |
||
50 | * @param \Xetaravel\Models\User $user The user to update. |
||
51 | * |
||
52 | * @return bool |
||
53 | */ |
||
54 | public static function updatePassword(array $data, User $user): bool |
||
60 | |||
61 | /** |
||
62 | * Find the notifications data for the notification sidebar. |
||
63 | * |
||
64 | * @param int $userId The id of the user. |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | public static function notificationsData($userId): array |
||
78 | } |
||
79 |