| Total Complexity | 2 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class CredentialsDetectorResult |
||
| 6 | { |
||
| 7 | const EMAIL = 'email'; |
||
| 8 | const PHONE = 'phone'; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | public $type; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | public $username; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * CredentialsDetectorResult constructor. |
||
| 22 | * |
||
| 23 | * @param string $type |
||
| 24 | * @param string $username |
||
| 25 | */ |
||
| 26 | public function __construct(string $type, string $username) |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get the credentials with given password. |
||
| 34 | * |
||
| 35 | * @param string $password |
||
| 36 | * @param string $field |
||
| 37 | * |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | public function credentials(string $password, string $field = 'password') |
||
| 48 |