| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | interface ICredentialProvider |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Validates a user-provided credential |
||
| 17 | * |
||
| 18 | * @param User $user The user to test the authentication against |
||
| 19 | * @param string $data The raw credential data to be validated |
||
| 20 | * |
||
| 21 | * @return bool |
||
| 22 | */ |
||
| 23 | public function authenticate(User $user, $data); |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param User $user The user the credential belongs to |
||
| 27 | * @param int $factor The factor this credential provides |
||
| 28 | * @param string $data |
||
| 29 | */ |
||
| 30 | public function setCredential(User $user, $factor, $data); |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param User $user |
||
| 34 | */ |
||
| 35 | public function deleteCredential(User $user); |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param int $userId |
||
| 39 | * |
||
| 40 | * @return bool |
||
| 41 | */ |
||
| 42 | public function userIsEnrolled($userId); |
||
| 43 | } |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.