| Total Complexity | 3 |
| Total Lines | 10 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | final class MD5Encoder implements PasswordEncoderInterface |
||
| 8 | { |
||
| 9 | public function encodePassword(string $raw, ?string $salt): string |
||
| 10 | { |
||
| 11 | return md5(null === $salt ? $raw : sprintf('%s_%s', $salt, $raw)); |
||
| 12 | } |
||
| 13 | |||
| 14 | public function isPasswordValid(string $encoded, string $raw, ?string $salt): bool |
||
| 17 | } |
||
| 18 | } |
||
| 19 |