Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class PwnedPasswordsService |
||
21 | { |
||
22 | const API_URL = 'https://api.pwnedpasswords.com/range/'; |
||
23 | |||
24 | /** |
||
25 | * Checks the given password against data breaches using the haveibeenpwned.com API |
||
26 | * Returns the amount of times the password is found in the haveibeenpwned.com database |
||
27 | * |
||
28 | * @param string $password |
||
29 | * @return int |
||
30 | */ |
||
31 | public function checkPassword(string $password): int |
||
55 |