1 | <?php |
||
40 | class SecondFactorService |
||
41 | { |
||
42 | /** |
||
43 | * @var LibrarySecondFactorService |
||
44 | */ |
||
45 | private $service; |
||
46 | |||
47 | /** |
||
48 | * @var ValidatorInterface |
||
49 | */ |
||
50 | private $validator; |
||
51 | |||
52 | /** |
||
53 | * @param LibrarySecondFactorService $service |
||
54 | * @param ValidatorInterface $validator |
||
55 | */ |
||
56 | public function __construct(LibrarySecondFactorService $service, ValidatorInterface $validator) |
||
61 | |||
62 | /** |
||
63 | * @param string $secondFactorId |
||
64 | * @return UnverifiedSecondFactor|null |
||
65 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
66 | * @throws InvalidResponseException When the API responded with invalid data. |
||
67 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
68 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
69 | */ |
||
70 | public function getUnverified($secondFactorId) |
||
90 | |||
91 | /** |
||
92 | * @param string $secondFactorId |
||
93 | * @return VerifiedSecondFactor|null |
||
94 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
95 | * @throws InvalidResponseException When the API responded with invalid data. |
||
96 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
97 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
98 | */ |
||
99 | public function getVerified($secondFactorId) |
||
119 | |||
120 | /** |
||
121 | * @param string $secondFactorId |
||
122 | * @return VettedSecondFactor|null |
||
123 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
124 | * @throws InvalidResponseException When the API responded with invalid data. |
||
125 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
126 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
127 | */ |
||
128 | public function getVetted($secondFactorId) |
||
148 | |||
149 | /** |
||
150 | * @param UnverifiedSecondFactorSearchQuery $query |
||
151 | * @return UnverifiedSecondFactorCollection |
||
|
|||
152 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
153 | * @throws InvalidResponseException When the API responded with invalid data. |
||
154 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
155 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
156 | */ |
||
157 | public function searchUnverified(UnverifiedSecondFactorSearchQuery $query) |
||
177 | |||
178 | /** |
||
179 | * @param VerifiedSecondFactorSearchQuery $query |
||
180 | * @return VerifiedSecondFactorCollection |
||
181 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
182 | * @throws InvalidResponseException When the API responded with invalid data. |
||
183 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
184 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
185 | */ |
||
186 | public function searchVerified(VerifiedSecondFactorSearchQuery $query) |
||
206 | |||
207 | /** |
||
208 | * @param VerifiedSecondFactorSearchQuery $query |
||
209 | * @return VerifiedSecondFactorCollection |
||
210 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
211 | * @throws InvalidResponseException When the API responded with invalid data. |
||
212 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
213 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
214 | */ |
||
215 | public function searchOwnVerified(VerifiedSecondFactorSearchQuery $query) |
||
235 | |||
236 | /** |
||
237 | * @param VettedSecondFactorSearchQuery $query |
||
238 | * @return VettedSecondFactorCollection |
||
239 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
240 | * @throws InvalidResponseException When the API responded with invalid data. |
||
241 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
242 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
243 | */ |
||
244 | public function searchVetted(VettedSecondFactorSearchQuery $query) |
||
264 | } |
||
265 |
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.