Code Duplication    Length = 7-7 lines in 2 locations

Notifier/src/Kreta/Notifier/Domain/Model/Inbox/User.php 2 locations

@@ 98-104 (lines=7) @@
95
96
    protected function applyUserReadNotification(UserReadNotification $event) : void
97
    {
98
        foreach ($this->notifications as $key => $notification) {
99
            if ($notification->id()->equals($event->notificationId())) {
100
                $this->notifications->of($key)->read();
101
102
                break;
103
            }
104
        }
105
    }
106
107
    protected function applyUserUnreadNotification(UserUnreadNotification $event) : void
@@ 109-115 (lines=7) @@
106
107
    protected function applyUserUnreadNotification(UserUnreadNotification $event) : void
108
    {
109
        foreach ($this->notifications as $key => $notification) {
110
            if ($notification->id()->equals($event->notificationId())) {
111
                $this->notifications->of($key)->unread();
112
113
                break;
114
            }
115
        }
116
    }
117
118
    public static function reconstitute(EventStream $stream) : EventSourcedAggregateRoot