Total Complexity | 1 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
27 | class Fnv1AHasher implements HasherInterface |
||
28 | { |
||
29 | /** |
||
30 | * {@inheritDoc} |
||
31 | * |
||
32 | * 8 hexits = 32bit, which also allows us to forego having to check whether |
||
33 | * it is over PHP_INT_MAX. |
||
34 | * |
||
35 | * The substring is converted to an int since hex strings sometimes get |
||
36 | * treated as ints if all digits are ints and this results in unexpected |
||
37 | * sorting order. |
||
38 | */ |
||
39 | 2 | public function hash(string $string): int |
|
44 |