| 1 | <?php |
||
| 11 | class InMemoryNotificationRepository implements NotificationRepository |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var Notification[] |
||
| 15 | */ |
||
| 16 | private $notifications = []; |
||
| 17 | |||
| 18 | private $nextIdentity = 1; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * {@inheritdoc} |
||
| 22 | */ |
||
| 23 | 1 | public function add(Notification $notification): void |
|
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | 2 | public function notificationOfId(NotificationId $notificationId): ?Notification |
|
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | public function hasNotificationOfDeduplicationKey(DeduplicationKey $deduplicationKey): bool |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | public function unsentNotifications(): array |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return NotificationId |
||
| 68 | */ |
||
| 69 | 1 | private function nextIdentity(): NotificationId |
|
| 73 | } |
||
| 74 |