Skip to content

Commit 3cf5b1a

Browse files
[NodeTypeResolver] Clean up resolve cache class name key (#5880)
* [NodeTypeResolver] Clean up resolve cache class name key * [ci-review] Rector Rectify * [NodeTypeResolver] Clean up resolve cache class name key --------- Co-authored-by: GitHub Action <[email protected]>
1 parent 8ab5e97 commit 3cf5b1a

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/Application/ApplicationFileProcessor.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Nette\Utils\FileSystem as UtilsFileSystem;
88
use Rector\Caching\Cache;
99
use Rector\Caching\Detector\ChangedFilesDetector;
10-
use Rector\Caching\Enum\CacheKey;
1110
use Rector\Configuration\Option;
1211
use Rector\Configuration\Parameter\SimpleParameterProvider;
1312
use Rector\Configuration\VendorMissAnalyseGuard;
@@ -77,7 +76,7 @@ public function run(Configuration $configuration, InputInterface $input): Proces
7776
}
7877

7978
// ensure clear classnames collection caches on repetitive call
80-
$key = CacheKey::CLASSNAMES_HASH_KEY . '_' . $this->dynamicSourceLocatorProvider->getCacheClassNameKey();
79+
$key = $this->dynamicSourceLocatorProvider->getCacheClassNameKey();
8180
$this->cache->clean($key);
8281

8382
$this->configureCustomErrorHandler();

src/FamilyTree/Reflection/FamilyRelationsAnalyzer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private function loadClasses(): void
106106
return;
107107
}
108108

109-
$key = CacheKey::CLASSNAMES_HASH_KEY . '_' . $this->dynamicSourceLocatorProvider->getCacheClassNameKey();
109+
$key = $this->dynamicSourceLocatorProvider->getCacheClassNameKey();
110110
$classNamesCache = $this->cache->load($key, CacheKey::CLASSNAMES_HASH_KEY);
111111

112112
if (is_string($classNamesCache)) {

src/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider/DynamicSourceLocatorProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function collectClasses(AggregateSourceLocator $aggregateSourceLocator,
143143
return;
144144
}
145145

146-
$key = CacheKey::CLASSNAMES_HASH_KEY . '_' . $this->getCacheClassNameKey();
146+
$key = $this->getCacheClassNameKey();
147147
$classNamesCache = $this->cache->load($key, CacheKey::CLASSNAMES_HASH_KEY);
148148

149149
if (is_string($classNamesCache)) {

0 commit comments

Comments
 (0)