@@ 93-105 (lines=13) @@ | ||
90 | ); |
|
91 | } |
|
92 | ||
93 | protected function applyVettedSecondFactorRevokedEvent(VettedSecondFactorRevokedEvent $event) |
|
94 | { |
|
95 | $secondFactor = $this->repository->findOneBySecondFactorId($event->secondFactorId); |
|
96 | ||
97 | if ($secondFactor === null) { |
|
98 | throw new RuntimeException(sprintf( |
|
99 | 'Expected to find a second factor having secondFactorId "%s", found none.', |
|
100 | $event->secondFactorId |
|
101 | )); |
|
102 | } |
|
103 | ||
104 | $this->repository->remove($secondFactor); |
|
105 | } |
|
106 | ||
107 | protected function applyCompliedWithVettedSecondFactorRevocationEvent( |
|
108 | CompliedWithVettedSecondFactorRevocationEvent $event |
|
@@ 107-120 (lines=14) @@ | ||
104 | $this->repository->remove($secondFactor); |
|
105 | } |
|
106 | ||
107 | protected function applyCompliedWithVettedSecondFactorRevocationEvent( |
|
108 | CompliedWithVettedSecondFactorRevocationEvent $event |
|
109 | ) { |
|
110 | $secondFactor = $this->repository->findOneBySecondFactorId($event->secondFactorId); |
|
111 | ||
112 | if ($secondFactor === null) { |
|
113 | throw new RuntimeException(sprintf( |
|
114 | 'Expected to find a second factor having secondFactorId "%s", found none.', |
|
115 | $event->secondFactorId |
|
116 | )); |
|
117 | } |
|
118 | ||
119 | $this->repository->remove($secondFactor); |
|
120 | } |
|
121 | ||
122 | protected function applyLocalePreferenceExpressedEvent(LocalePreferenceExpressedEvent $event) |
|
123 | { |