Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Domain\Notification\Repository; |
| 6 | |
| 7 | use App\Domain\Notification\Data\NotificationPreference; |
| 8 | |
| 9 | /** |
| 10 | * Storage contract for per-user notification preferences. Tests substitute |
| 11 | * an in-memory implementation via the DI container. |
| 12 | */ |
| 13 | interface NotificationPreferenceRepositoryInterface |
| 14 | { |
| 15 | /** |
| 16 | * @param int $userId |
| 17 | * @return list<NotificationPreference> |
| 18 | */ |
| 19 | public function getByUserId(int $userId): array; |
| 20 | |
| 21 | public function upsert(int $userId, string $notificationType, string $channel, bool $enabled): void; |
| 22 | |
| 23 | /** |
| 24 | * Email addresses of admin / super_admin users opted into the given |
| 25 | * admin notification type. |
| 26 | * |
| 27 | * @param string $notificationType |
| 28 | * @return list<string> |
| 29 | */ |
| 30 | public function getEnabledRecipientsForAdminType(string $notificationType): array; |
| 31 | } |