| Total Complexity | 1 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | trait CredentialFieldsTrait |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * Credential fields |
||
| 30 | * |
||
| 31 | * @var array<string, string> |
||
| 32 | */ |
||
| 33 | protected array $credentialFields = [ |
||
| 34 | IdentifierInterface::CREDENTIAL_USERNAME => 'username', |
||
| 35 | IdentifierInterface::CREDENTIAL_PASSWORD => 'password' |
||
| 36 | ]; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Set the fields used to to get the credentials from |
||
| 40 | * |
||
| 41 | * @param string $username Username field |
||
| 42 | * @param string $password Password field |
||
| 43 | 8 | * @return $this |
|
| 44 | */ |
||
| 45 | 8 | public function setCredentialFields(string $username, string $password): self |
|
| 53 |