Skip to content

Commit

Permalink
chore: re-use CodeHasher (#7984)
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed May 5, 2024
1 parent 637a6f4 commit 36873f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Cache/FileCacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

namespace PhpCsFixer\Cache;

use PhpCsFixer\Tokenizer\CodeHasher;

/**
* Class supports caching information about state of fixing files.
*
Expand Down Expand Up @@ -136,6 +138,6 @@ private function writeCache(): void

private function calcHash(string $content): string
{
return md5($content);
return CodeHasher::calculateCodeHash($content);
}
}

0 comments on commit 36873f5

Please sign in to comment.