Skip to content

Commit baa8f5c

Browse files
committed
fix phpstan on php 8+
1 parent 23f314b commit baa8f5c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/PHPStan/Type/FileTypeMapperTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,15 @@ public function testRecursiveTraitUsedInAnonymousClassDoesNotLoopIndefinitely():
251251
private function clearFileTypeMapperCache(string $tmpDir, string $fileName): void
252252
{
253253
$cacheKeyHash = hash('sha256', sprintf('ftm-%s', $fileName));
254+
255+
$directory1 = substr($cacheKeyHash, 0, 2);
256+
$directory2 = substr($cacheKeyHash, 2, 2);
257+
254258
$cacheFilePath = sprintf(
255259
'%s/cache/PHPStan/%s/%s/%s.php',
256260
$tmpDir,
257-
(string) substr($cacheKeyHash, 0, 2),
258-
(string) substr($cacheKeyHash, 2, 2),
261+
$directory1,
262+
$directory2,
259263
$cacheKeyHash,
260264
);
261265

0 commit comments

Comments
 (0)