| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class PwnedPasswordsService |
||
| 15 | { |
||
| 16 | const API_URL = 'https://api.pwnedpasswords.com/range/'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Checks the given password against data breaches using the haveibeenpwned.com API |
||
| 20 | * Returns the amount of times the password is found in the haveibeenpwned.com database |
||
| 21 | * |
||
| 22 | * @param string $password |
||
| 23 | * @return int |
||
| 24 | */ |
||
| 25 | public function checkPassword(string $password) |
||
| 46 |