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 VettedSecondFactor|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 getVetted($secondFactorId) |
||
149 | |||
150 | /** |
||
151 | * @param UnverifiedSecondFactorSearchQuery $query |
||
152 | * @return UnverifiedSecondFactorCollection |
||
|
|||
153 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
154 | * @throws InvalidResponseException When the API responded with invalid data. |
||
155 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
156 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
157 | */ |
||
158 | public function searchUnverified(UnverifiedSecondFactorSearchQuery $query) |
||
178 | |||
179 | /** |
||
180 | * @param VerifiedSecondFactorSearchQuery $query |
||
181 | * @return VerifiedSecondFactorCollection |
||
182 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
183 | * @throws InvalidResponseException When the API responded with invalid data. |
||
184 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
185 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
186 | */ |
||
187 | public function searchVerified(VerifiedSecondFactorSearchQuery $query) |
||
207 | |||
208 | /** |
||
209 | * @param VerifiedSecondFactorOfIdentitySearchQuery $query |
||
210 | * @return VerifiedSecondFactorCollection |
||
211 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
212 | * @throws InvalidResponseException When the API responded with invalid data. |
||
213 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
214 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
215 | */ |
||
216 | public function searchOwnVerified(VerifiedSecondFactorOfIdentitySearchQuery $query) |
||
236 | |||
237 | /** |
||
238 | * @param VettedSecondFactorSearchQuery $query |
||
239 | * @return VettedSecondFactorCollection |
||
240 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
241 | * @throws InvalidResponseException When the API responded with invalid data. |
||
242 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
243 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
244 | */ |
||
245 | public function searchVetted(VettedSecondFactorSearchQuery $query) |
||
265 | } |
||
266 |
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.