1 | <?php |
||
41 | class SecondFactorService |
||
42 | { |
||
43 | /** |
||
44 | * @var LibrarySecondFactorService |
||
45 | */ |
||
46 | private $service; |
||
47 | |||
48 | /** |
||
49 | * @var ValidatorInterface |
||
50 | */ |
||
51 | private $validator; |
||
52 | |||
53 | /** |
||
54 | * @param LibrarySecondFactorService $service |
||
55 | * @param ValidatorInterface $validator |
||
56 | */ |
||
57 | public function __construct(LibrarySecondFactorService $service, ValidatorInterface $validator) |
||
62 | |||
63 | /** |
||
64 | * @param string $secondFactorId |
||
65 | * @return UnverifiedSecondFactor|null |
||
66 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
67 | * @throws InvalidResponseException When the API responded with invalid data. |
||
68 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
69 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
70 | */ |
||
71 | public function getUnverified($secondFactorId) |
||
91 | |||
92 | /** |
||
93 | * @param string $secondFactorId |
||
94 | * @return VerifiedSecondFactor|null |
||
95 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
96 | * @throws InvalidResponseException When the API responded with invalid data. |
||
97 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
98 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
99 | */ |
||
100 | public function getVerified($secondFactorId) |
||
120 | |||
121 | /** |
||
122 | * @param string $secondFactorId |
||
123 | * @return VerifiedSecondFactor|null |
||
|
|||
124 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
125 | * @throws InvalidResponseException When the API responded with invalid data. |
||
126 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
127 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
128 | */ |
||
129 | public function getVerifiedSkipVetting($secondFactorId) |
||
139 | |||
140 | /** |
||
141 | * @param string $secondFactorId |
||
142 | * @return VettedSecondFactor|null |
||
143 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
144 | * @throws InvalidResponseException When the API responded with invalid data. |
||
145 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
146 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
147 | */ |
||
148 | public function getVetted($secondFactorId) |
||
168 | |||
169 | /** |
||
170 | * @param UnverifiedSecondFactorSearchQuery $query |
||
171 | * @return UnverifiedSecondFactorCollection |
||
172 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
173 | * @throws InvalidResponseException When the API responded with invalid data. |
||
174 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
175 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
176 | */ |
||
177 | public function searchUnverified(UnverifiedSecondFactorSearchQuery $query) |
||
197 | |||
198 | /** |
||
199 | * @param VerifiedSecondFactorSearchQuery $query |
||
200 | * @return VerifiedSecondFactorCollection |
||
201 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
202 | * @throws InvalidResponseException When the API responded with invalid data. |
||
203 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
204 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
205 | */ |
||
206 | public function searchVerified(VerifiedSecondFactorSearchQuery $query) |
||
226 | |||
227 | /** |
||
228 | * @param VerifiedSecondFactorOfIdentitySearchQuery $query |
||
229 | * @return VerifiedSecondFactorCollection |
||
230 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
231 | * @throws InvalidResponseException When the API responded with invalid data. |
||
232 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
233 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
234 | */ |
||
235 | public function searchOwnVerified(VerifiedSecondFactorOfIdentitySearchQuery $query) |
||
255 | |||
256 | /** |
||
257 | * @param VettedSecondFactorSearchQuery $query |
||
258 | * @return VettedSecondFactorCollection |
||
259 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
260 | * @throws InvalidResponseException When the API responded with invalid data. |
||
261 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
262 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
263 | */ |
||
264 | public function searchVetted(VettedSecondFactorSearchQuery $query) |
||
284 | } |
||
285 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.