Code Duplication    Length = 16-17 lines in 2 locations

src/Surfnet/StepupMiddleware/CommandHandlingBundle/Processor/EmailProcessor.php 2 locations

@@ 158-174 (lines=17) @@
155
        $this->mailService->sendVettedEmail($event->preferredLocale, $event->commonName, $event->email);
156
    }
157
158
    public function handleCompliedWithVettedSecondFactorRevocationEvent(
159
        CompliedWithVettedSecondFactorRevocationEvent $event
160
    ) {
161
        $identity = $this->identityService->find($event->identityId->getIdentityId());
162
163
        if ($identity === null) {
164
            return;
165
        }
166
167
        $this->mailService->sendVettedSecondFactorRevokedByRaEmail(
168
            $identity->preferredLocale,
169
            $identity->commonName,
170
            $identity->email,
171
            $event->secondFactorType,
172
            $event->secondFactorIdentifier
173
        );
174
    }
175
176
    public function handleVettedSecondFactorRevokedEvent(SecondFactorRevokedEvent $event)
177
    {
@@ 176-191 (lines=16) @@
173
        );
174
    }
175
176
    public function handleVettedSecondFactorRevokedEvent(SecondFactorRevokedEvent $event)
177
    {
178
        $identity = $this->identityService->find($event->identityId->getIdentityId());
179
180
        if ($identity === null) {
181
            return;
182
        }
183
184
        $this->mailService->sendVettedSecondFactorRevokedBySelfEmail(
185
            $identity->preferredLocale,
186
            $identity->commonName,
187
            $identity->email,
188
            $event->secondFactorType,
189
            $event->secondFactorIdentifier
190
        );
191
    }
192
193
    /**
194
     * @param EmailVerifiedEvent $event