Code Duplication    Length = 8-8 lines in 2 locations

src/BenGorUser/User/Infrastructure/Persistence/InMemoryUserRepository.php 2 locations

@@ 124-131 (lines=8) @@
121
    /**
122
     * {@inheritdoc}
123
     */
124
    public function persist(User $aUser)
125
    {
126
        $this->users[$aUser->id()->id()] = $aUser;
127
128
        if ($this->eventBus instanceof UserEventBus) {
129
            $this->handle($aUser->events());
130
        }
131
    }
132
133
    /**
134
     * {@inheritdoc}
@@ 136-143 (lines=8) @@
133
    /**
134
     * {@inheritdoc}
135
     */
136
    public function remove(User $aUser)
137
    {
138
        unset($this->users[$aUser->id()->id()]);
139
140
        if ($this->eventBus instanceof UserEventBus) {
141
            $this->handle($aUser->events());
142
        }
143
    }
144
145
    /**
146
     * {@inheritdoc}