Browse Source

chore: re-use CodeHasher (#7984)

Dariusz Rumiński 10 months ago
parent
commit
36873f5a4b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Cache/FileCacheManager.php

+ 3 - 1
src/Cache/FileCacheManager.php

@@ -14,6 +14,8 @@ declare(strict_types=1);
 
 namespace PhpCsFixer\Cache;
 
+use PhpCsFixer\Tokenizer\CodeHasher;
+
 /**
  * Class supports caching information about state of fixing files.
  *
@@ -136,6 +138,6 @@ final class FileCacheManager implements CacheManagerInterface
 
     private function calcHash(string $content): string
     {
-        return md5($content);
+        return CodeHasher::calculateCodeHash($content);
     }
 }