We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7727f2 commit 53f94acCopy full SHA for 53f94ac
src/FileLockResolver.php
@@ -225,7 +225,8 @@ public function fnv(string $str): float
225
226
for ($i = 0; $i < strlen($str); $i++) {
227
$hash ^= ord($str[$i]);
228
- $hash *= 16777619;
+ $hash *= 0x01000193;
229
+ $hash &= 0xFFFFFFFF;
230
}
231
232
return $hash;
tests/FileLockResolverTest.php
@@ -216,8 +216,8 @@ public function test_update_contents_with_content()
216
public function test_fnv()
217
{
218
$resolver = new FileLockResolver;
219
- $a = $resolver->fnv('1');
220
- $b = $resolver->fnv(1);
+ $a = $resolver->fnv('1674128900558');
+ $b = $resolver->fnv(1674128900558);
221
222
$this->assertEquals($a, $b);
223
0 commit comments