Completed
Pull Request — develop (#285)
by
unknown
04:32 queued 02:13
created

applyU2fDevicePossessionProvenAndVerifiedEvent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 14
Ratio 100 %

Importance

Changes 0
Metric Value
dl 14
loc 14
rs 9.7998
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * Copyright 2014 SURFnet bv
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18
19
namespace Surfnet\StepupMiddleware\ApiBundle\Identity\Projector;
20
21
use Broadway\ReadModel\Projector;
22
use Surfnet\Stepup\Identity\Event\CompliedWithUnverifiedSecondFactorRevocationEvent;
23
use Surfnet\Stepup\Identity\Event\CompliedWithVerifiedSecondFactorRevocationEvent;
24
use Surfnet\Stepup\Identity\Event\CompliedWithVettedSecondFactorRevocationEvent;
25
use Surfnet\Stepup\Identity\Event\EmailVerifiedEvent;
26
use Surfnet\Stepup\Identity\Event\GssfPossessionProvenAndVerifiedEvent;
27
use Surfnet\Stepup\Identity\Event\GssfPossessionProvenEvent;
28
use Surfnet\Stepup\Identity\Event\IdentityForgottenEvent;
29
use Surfnet\Stepup\Identity\Event\PhonePossessionProvenAndVerifiedEvent;
30
use Surfnet\Stepup\Identity\Event\PhonePossessionProvenEvent;
31
use Surfnet\Stepup\Identity\Event\SecondFactorVettedEvent;
32
use Surfnet\Stepup\Identity\Event\UnverifiedSecondFactorRevokedEvent;
33
use Surfnet\Stepup\Identity\Event\VerifiedSecondFactorRevokedEvent;
34
use Surfnet\Stepup\Identity\Event\VettedSecondFactorRevokedEvent;
35
use Surfnet\Stepup\Identity\Event\YubikeyPossessionProvenAndVerifiedEvent;
36
use Surfnet\Stepup\Identity\Event\YubikeyPossessionProvenEvent;
37
use Surfnet\Stepup\Identity\Event\YubikeySecondFactorBootstrappedEvent;
38
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\UnverifiedSecondFactor;
39
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\VerifiedSecondFactor;
40
use Surfnet\StepupMiddleware\ApiBundle\Identity\Entity\VettedSecondFactor;
41
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\IdentityRepository;
42
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\UnverifiedSecondFactorRepository;
43
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VerifiedSecondFactorRepository;
44
use Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VettedSecondFactorRepository;
45
46
/**
47
 * @SuppressWarnings(PHPMD.TooManyMethods)
48
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
49
 * @SuppressWarnings(PHPMD.TooManyPublicMethods)
50
 */
51
class SecondFactorProjector extends Projector
52
{
53
    /**
54
     * @var \Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\UnverifiedSecondFactorRepository
55
     */
56
    private $unverifiedRepository;
57
58
    /**
59
     * @var \Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VerifiedSecondFactorRepository
60
     */
61
    private $verifiedRepository;
62
63
    /**
64
     * @var \Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\VettedSecondFactorRepository
65
     */
66
    private $vettedRepository;
67
68
    /**
69
     * @var \Surfnet\StepupMiddleware\ApiBundle\Identity\Repository\IdentityRepository
70
     */
71
    private $identityRepository;
72
73
    public function __construct(
74
        UnverifiedSecondFactorRepository $unverifiedRepository,
75
        VerifiedSecondFactorRepository $verifiedRepository,
76
        VettedSecondFactorRepository $vettedRepository,
77
        IdentityRepository $identityRepository
78
    ) {
79
        $this->unverifiedRepository = $unverifiedRepository;
80
        $this->verifiedRepository = $verifiedRepository;
81
        $this->vettedRepository = $vettedRepository;
82
        $this->identityRepository = $identityRepository;
83
    }
84
85
    public function applyYubikeySecondFactorBootstrappedEvent(YubikeySecondFactorBootstrappedEvent $event)
86
    {
87
        $secondFactor = new VettedSecondFactor();
88
        $secondFactor->id = $event->secondFactorId->getSecondFactorId();
89
        $secondFactor->identityId = $event->identityId->getIdentityId();
90
        $secondFactor->type = 'yubikey';
91
        $secondFactor->secondFactorIdentifier = $event->yubikeyPublicId->getValue();
92
93
        $this->vettedRepository->save($secondFactor);
94
    }
95
96 View Code Duplication
    public function applyYubikeyPossessionProvenEvent(YubikeyPossessionProvenEvent $event)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
97
    {
98
        $secondFactor = new UnverifiedSecondFactor();
99
        $secondFactor->id = $event->secondFactorId->getSecondFactorId();
100
        $secondFactor->identityId = $event->identityId->getIdentityId();
101
        $secondFactor->type = 'yubikey';
102
        $secondFactor->secondFactorIdentifier = $event->yubikeyPublicId->getValue();
103
        $secondFactor->verificationNonce = $event->emailVerificationNonce;
104
105
        $this->unverifiedRepository->save($secondFactor);
106
    }
107
108 View Code Duplication
    public function applyYubikeyPossessionProvenAndVerifiedEvent(YubikeyPossessionProvenAndVerifiedEvent $event)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
109
    {
110
        $secondFactor = new VerifiedSecondFactor();
111
        $secondFactor->id = $event->secondFactorId->getSecondFactorId();
112
        $secondFactor->identityId = $event->identityId->getIdentityId();
113
        $secondFactor->institution = $event->identityInstitution->getInstitution();
114
        $secondFactor->type = 'yubikey';
115
        $secondFactor->secondFactorIdentifier = $event->yubikeyPublicId->getValue();
116
        $secondFactor->commonName = $event->commonName;
0 ignored issues
show
Documentation Bug introduced by
It seems like $event->commonName of type object<Surfnet\Stepup\Identity\Value\CommonName> is incompatible with the declared type string of property $commonName.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
117
        $secondFactor->registrationRequestedAt = $event->registrationRequestedAt;
0 ignored issues
show
Documentation Bug introduced by
It seems like $event->registrationRequestedAt of type object<Surfnet\Stepup\DateTime\DateTime> is incompatible with the declared type object<DateTime> of property $registrationRequestedAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
118
        $secondFactor->registrationCode = $event->registrationCode;
119
120
        $this->verifiedRepository->save($secondFactor);
121
    }
122
123 View Code Duplication
    public function applyPhonePossessionProvenEvent(PhonePossessionProvenEvent $event)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
124
    {
125
        $secondFactor = new UnverifiedSecondFactor();
126
        $secondFactor->id = $event->secondFactorId->getSecondFactorId();
127
        $secondFactor->identityId = $event->identityId->getIdentityId();
128
        $secondFactor->type = 'sms';
129
        $secondFactor->secondFactorIdentifier = $event->phoneNumber->getValue();
130
        $secondFactor->verificationNonce = $event->emailVerificationNonce;
131
132
        $this->unverifiedRepository->save($secondFactor);
133
    }
134
135 View Code Duplication
    public function applyPhonePossessionProvenAndVerifiedEvent(PhonePossessionProvenAndVerifiedEvent $event)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
136
    {
137
        $secondFactor = new VerifiedSecondFactor();
138
        $secondFactor->id = $event->secondFactorId->getSecondFactorId();
139
        $secondFactor->identityId = $event->identityId->getIdentityId();
140
        $secondFactor->institution = $event->identityInstitution->getInstitution();
141
        $secondFactor->type = 'sms';
142
        $secondFactor->secondFactorIdentifier = $event->phoneNumber->getValue();
143
        $secondFactor->commonName = $event->commonName;
0 ignored issues
show
Documentation Bug introduced by
It seems like $event->commonName of type object<Surfnet\Stepup\Identity\Value\CommonName> is incompatible with the declared type string of property $commonName.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
144
        $secondFactor->registrationRequestedAt = $event->registrationRequestedAt;
0 ignored issues
show
Documentation Bug introduced by
It seems like $event->registrationRequestedAt of type object<Surfnet\Stepup\DateTime\DateTime> is incompatible with the declared type object<DateTime> of property $registrationRequestedAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
145
        $secondFactor->registrationCode = $event->registrationCode;
146
147
        $this->verifiedRepository->save($secondFactor);
148
    }
149
150 View Code Duplication
    public function applyGssfPossessionProvenEvent(GssfPossessionProvenEvent $event)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
151
    {
152
        $secondFactor = new UnverifiedSecondFactor();
153
        $secondFactor->id = $event->secondFactorId->getSecondFactorId();
154
        $secondFactor->identityId = $event->identityId->getIdentityId();
155
        $secondFactor->type = $event->stepupProvider->getStepupProvider();
156
        $secondFactor->secondFactorIdentifier = $event->gssfId->getValue();
157
        $secondFactor->verificationNonce = $event->emailVerificationNonce;
158
159
        $this->unverifiedRepository->save($secondFactor);
160
    }
161
162 View Code Duplication
    public function applyGssfPossessionProvenAndVerifiedEvent(GssfPossessionProvenAndVerifiedEvent $event)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
163
    {
164
        $secondFactor = new VerifiedSecondFactor();
165
        $secondFactor->id = $event->secondFactorId->getSecondFactorId();
166
        $secondFactor->identityId = $event->identityId->getIdentityId();
167
        $secondFactor->institution = $event->identityInstitution->getInstitution();
168
        $secondFactor->type = $event->stepupProvider->getStepupProvider();
169
        $secondFactor->secondFactorIdentifier = $event->gssfId->getValue();
170
        $secondFactor->commonName = $event->commonName;
0 ignored issues
show
Documentation Bug introduced by
It seems like $event->commonName of type object<Surfnet\Stepup\Identity\Value\CommonName> is incompatible with the declared type string of property $commonName.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
171
        $secondFactor->registrationRequestedAt = $event->registrationRequestedAt;
0 ignored issues
show
Documentation Bug introduced by
It seems like $event->registrationRequestedAt of type object<Surfnet\Stepup\DateTime\DateTime> is incompatible with the declared type object<DateTime> of property $registrationRequestedAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
172
        $secondFactor->registrationCode = $event->registrationCode;
173
174
        $this->verifiedRepository->save($secondFactor);
175
    }
176
177
    public function applyEmailVerifiedEvent(EmailVerifiedEvent $event)
178
    {
179
        $unverified = $this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId());
180
181
        $verified = new VerifiedSecondFactor();
182
        $verified->id = $event->secondFactorId->getSecondFactorId();
183
        $verified->identityId = $event->identityId->getIdentityId();
184
        $verified->institution = $event->identityInstitution->getInstitution();
185
        $verified->commonName = $event->commonName->getCommonName();
186
        $verified->type = $event->secondFactorType->getSecondFactorType();
187
        $verified->secondFactorIdentifier = $unverified->secondFactorIdentifier;
188
        $verified->registrationCode = $event->registrationCode;
189
        $verified->registrationRequestedAt = $event->registrationRequestedAt;
0 ignored issues
show
Documentation Bug introduced by
It seems like $event->registrationRequestedAt of type object<Surfnet\Stepup\DateTime\DateTime> is incompatible with the declared type object<DateTime> of property $registrationRequestedAt.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
190
191
        $this->verifiedRepository->save($verified);
192
        $this->unverifiedRepository->remove($unverified);
193
    }
194
195
    public function applySecondFactorVettedEvent(SecondFactorVettedEvent $event)
196
    {
197
        $verified = $this->verifiedRepository->find($event->secondFactorId->getSecondFactorId());
198
199
        $vetted = new VettedSecondFactor();
200
        $vetted->id = $event->secondFactorId->getSecondFactorId();
201
        $vetted->identityId = $event->identityId->getIdentityId();
202
        $vetted->type = $event->secondFactorType->getSecondFactorType();
203
        $vetted->secondFactorIdentifier = $event->secondFactorIdentifier->getValue();
204
205
        $this->vettedRepository->save($vetted);
206
        $this->verifiedRepository->remove($verified);
0 ignored issues
show
Bug introduced by
It seems like $verified defined by $this->verifiedRepositor...d->getSecondFactorId()) on line 197 can be null; however, Surfnet\StepupMiddleware...torRepository::remove() does not accept null, maybe add an additional type check?

Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code:

/** @return stdClass|null */
function mayReturnNull() { }

function doesNotAcceptNull(stdClass $x) { }

// With potential error.
function withoutCheck() {
    $x = mayReturnNull();
    doesNotAcceptNull($x); // Potential error here.
}

// Safe - Alternative 1
function withCheck1() {
    $x = mayReturnNull();
    if ( ! $x instanceof stdClass) {
        throw new \LogicException('$x must be defined.');
    }
    doesNotAcceptNull($x);
}

// Safe - Alternative 2
function withCheck2() {
    $x = mayReturnNull();
    if ($x instanceof stdClass) {
        doesNotAcceptNull($x);
    }
}
Loading history...
207
    }
208
209
    protected function applyUnverifiedSecondFactorRevokedEvent(UnverifiedSecondFactorRevokedEvent $event)
210
    {
211
        $this->unverifiedRepository->remove($this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId()));
0 ignored issues
show
Bug introduced by
It seems like $this->unverifiedReposit...d->getSecondFactorId()) can be null; however, remove() does not accept null, maybe add an additional type check?

Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code:

/** @return stdClass|null */
function mayReturnNull() { }

function doesNotAcceptNull(stdClass $x) { }

// With potential error.
function withoutCheck() {
    $x = mayReturnNull();
    doesNotAcceptNull($x); // Potential error here.
}

// Safe - Alternative 1
function withCheck1() {
    $x = mayReturnNull();
    if ( ! $x instanceof stdClass) {
        throw new \LogicException('$x must be defined.');
    }
    doesNotAcceptNull($x);
}

// Safe - Alternative 2
function withCheck2() {
    $x = mayReturnNull();
    if ($x instanceof stdClass) {
        doesNotAcceptNull($x);
    }
}
Loading history...
212
    }
213
214
    protected function applyCompliedWithUnverifiedSecondFactorRevocationEvent(
215
        CompliedWithUnverifiedSecondFactorRevocationEvent $event
216
    ) {
217
        $this->unverifiedRepository->remove($this->unverifiedRepository->find($event->secondFactorId->getSecondFactorId()));
0 ignored issues
show
Bug introduced by
It seems like $this->unverifiedReposit...d->getSecondFactorId()) can be null; however, remove() does not accept null, maybe add an additional type check?

Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code:

/** @return stdClass|null */
function mayReturnNull() { }

function doesNotAcceptNull(stdClass $x) { }

// With potential error.
function withoutCheck() {
    $x = mayReturnNull();
    doesNotAcceptNull($x); // Potential error here.
}

// Safe - Alternative 1
function withCheck1() {
    $x = mayReturnNull();
    if ( ! $x instanceof stdClass) {
        throw new \LogicException('$x must be defined.');
    }
    doesNotAcceptNull($x);
}

// Safe - Alternative 2
function withCheck2() {
    $x = mayReturnNull();
    if ($x instanceof stdClass) {
        doesNotAcceptNull($x);
    }
}
Loading history...
218
    }
219
220
    protected function applyVerifiedSecondFactorRevokedEvent(VerifiedSecondFactorRevokedEvent $event)
221
    {
222
        $this->verifiedRepository->remove($this->verifiedRepository->find($event->secondFactorId->getSecondFactorId()));
0 ignored issues
show
Bug introduced by
It seems like $this->verifiedRepositor...d->getSecondFactorId()) can be null; however, remove() does not accept null, maybe add an additional type check?

Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code:

/** @return stdClass|null */
function mayReturnNull() { }

function doesNotAcceptNull(stdClass $x) { }

// With potential error.
function withoutCheck() {
    $x = mayReturnNull();
    doesNotAcceptNull($x); // Potential error here.
}

// Safe - Alternative 1
function withCheck1() {
    $x = mayReturnNull();
    if ( ! $x instanceof stdClass) {
        throw new \LogicException('$x must be defined.');
    }
    doesNotAcceptNull($x);
}

// Safe - Alternative 2
function withCheck2() {
    $x = mayReturnNull();
    if ($x instanceof stdClass) {
        doesNotAcceptNull($x);
    }
}
Loading history...
223
    }
224
225
    protected function applyCompliedWithVerifiedSecondFactorRevocationEvent(
226
        CompliedWithVerifiedSecondFactorRevocationEvent $event
227
    ) {
228
        $this->verifiedRepository->remove($this->verifiedRepository->find($event->secondFactorId->getSecondFactorId()));
0 ignored issues
show
Bug introduced by
It seems like $this->verifiedRepositor...d->getSecondFactorId()) can be null; however, remove() does not accept null, maybe add an additional type check?

Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code:

/** @return stdClass|null */
function mayReturnNull() { }

function doesNotAcceptNull(stdClass $x) { }

// With potential error.
function withoutCheck() {
    $x = mayReturnNull();
    doesNotAcceptNull($x); // Potential error here.
}

// Safe - Alternative 1
function withCheck1() {
    $x = mayReturnNull();
    if ( ! $x instanceof stdClass) {
        throw new \LogicException('$x must be defined.');
    }
    doesNotAcceptNull($x);
}

// Safe - Alternative 2
function withCheck2() {
    $x = mayReturnNull();
    if ($x instanceof stdClass) {
        doesNotAcceptNull($x);
    }
}
Loading history...
229
    }
230
231
    protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event)
232
    {
233
        $this->vettedRepository->remove($this->vettedRepository->find($event->secondFactorId->getSecondFactorId()));
0 ignored issues
show
Bug introduced by
It seems like $this->vettedRepository-...d->getSecondFactorId()) can be null; however, remove() does not accept null, maybe add an additional type check?

Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code:

/** @return stdClass|null */
function mayReturnNull() { }

function doesNotAcceptNull(stdClass $x) { }

// With potential error.
function withoutCheck() {
    $x = mayReturnNull();
    doesNotAcceptNull($x); // Potential error here.
}

// Safe - Alternative 1
function withCheck1() {
    $x = mayReturnNull();
    if ( ! $x instanceof stdClass) {
        throw new \LogicException('$x must be defined.');
    }
    doesNotAcceptNull($x);
}

// Safe - Alternative 2
function withCheck2() {
    $x = mayReturnNull();
    if ($x instanceof stdClass) {
        doesNotAcceptNull($x);
    }
}
Loading history...
234
    }
235
236
    protected function applyCompliedWithVettedSecondFactorRevocationEvent(
237
        CompliedWithVettedSecondFactorRevocationEvent $event
238
    ) {
239
        $this->vettedRepository->remove($this->vettedRepository->find($event->secondFactorId->getSecondFactorId()));
0 ignored issues
show
Bug introduced by
It seems like $this->vettedRepository-...d->getSecondFactorId()) can be null; however, remove() does not accept null, maybe add an additional type check?

Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code:

/** @return stdClass|null */
function mayReturnNull() { }

function doesNotAcceptNull(stdClass $x) { }

// With potential error.
function withoutCheck() {
    $x = mayReturnNull();
    doesNotAcceptNull($x); // Potential error here.
}

// Safe - Alternative 1
function withCheck1() {
    $x = mayReturnNull();
    if ( ! $x instanceof stdClass) {
        throw new \LogicException('$x must be defined.');
    }
    doesNotAcceptNull($x);
}

// Safe - Alternative 2
function withCheck2() {
    $x = mayReturnNull();
    if ($x instanceof stdClass) {
        doesNotAcceptNull($x);
    }
}
Loading history...
240
    }
241
242
    protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event)
243
    {
244
        $this->unverifiedRepository->removeByIdentityId($event->identityId);
245
        $this->verifiedRepository->removeByIdentityId($event->identityId);
246
        $this->vettedRepository->removeByIdentityId($event->identityId);
247
    }
248
}
249