Skip to content

Commit

Permalink
Result cache - debug message about successfully restored cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jul 5, 2024
1 parent d55933f commit 979055f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Analyser/ResultCache/ResultCacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,18 @@ public function restore(array $allAnalysedFiles, bool $debug, bool $onlyFiles, ?
}
}

return new ResultCache(array_unique($filesToAnalyse), false, $data['lastFullAnalysisTime'], $meta, $filteredErrors, $filteredLocallyIgnoredErrors, $filteredLinesToIgnore, $filteredUnmatchedLineIgnores, $filteredCollectedData, $invertedDependenciesToReturn, $filteredExportedNodes, $data['projectExtensionFiles']);
$filesToAnalyse = array_unique($filesToAnalyse);
$filesToAnalyseCount = count($filesToAnalyse);

if ($output->isDebug()) {
$output->writeLineFormatted(sprintf(
'Result cache restored. %d %s will be reanalysed.',
$filesToAnalyseCount,
$filesToAnalyseCount === 1 ? 'file' : 'files',
));
}

return new ResultCache($filesToAnalyse, false, $data['lastFullAnalysisTime'], $meta, $filteredErrors, $filteredLocallyIgnoredErrors, $filteredLinesToIgnore, $filteredUnmatchedLineIgnores, $filteredCollectedData, $invertedDependenciesToReturn, $filteredExportedNodes, $data['projectExtensionFiles']);
}

/**
Expand Down

1 comment on commit 979055f

@janedbal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.