Skip to content

Commit 6ac32d5

Browse files
Use a constant to declare the cache format version
1 parent e3d4cef commit 6ac32d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/StaticAnalysis/CachingUncoveredFileAnalyser.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*/
1515
final class CachingUncoveredFileAnalyser extends Cache implements UncoveredFileAnalyser
1616
{
17+
private const CACHE_FORMAT_VERSION = 2;
18+
1719
/**
1820
* @var UncoveredFileAnalyser
1921
*/
@@ -28,7 +30,7 @@ public function __construct(string $directory, UncoveredFileAnalyser $uncoveredF
2830

2931
public function executableLinesIn(string $filename): array
3032
{
31-
$cacheKey = 'v2' . __METHOD__;
33+
$cacheKey = __CLASS__ . self::CACHE_FORMAT_VERSION;
3234

3335
if ($this->has($filename, $cacheKey)) {
3436
return $this->read($filename, $cacheKey);

0 commit comments

Comments
 (0)