Skip to content

Commit a5744d0

Browse files
committed
Move result cache info from debug to verbose mode
1 parent 64ed7dc commit a5744d0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Analyser/ResultCache/ResultCacheManager.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,20 +412,20 @@ public function process(AnalyserResult $analyserResult, ResultCache $resultCache
412412
}
413413
$doSave = function (array $errorsByFile, $locallyIgnoredErrorsByFile, $linesToIgnore, $unmatchedLineIgnores, $collectedDataByFile, ?array $dependencies, array $exportedNodes, array $projectExtensionFiles) use ($internalErrors, $resultCache, $output, $onlyFiles, $meta): bool {
414414
if ($onlyFiles) {
415-
if ($output->isDebug()) {
415+
if ($output->isVerbose()) {
416416
$output->writeLineFormatted('Result cache was not saved because only files were passed as analysed paths.');
417417
}
418418
return false;
419419
}
420420
if ($dependencies === null) {
421-
if ($output->isDebug()) {
421+
if ($output->isVerbose()) {
422422
$output->writeLineFormatted('Result cache was not saved because of error in dependencies.');
423423
}
424424
return false;
425425
}
426426

427427
if (count($internalErrors) > 0) {
428-
if ($output->isDebug()) {
428+
if ($output->isVerbose()) {
429429
$output->writeLineFormatted('Result cache was not saved because of internal errors.');
430430
}
431431
return false;
@@ -437,7 +437,7 @@ public function process(AnalyserResult $analyserResult, ResultCache $resultCache
437437
continue;
438438
}
439439

440-
if ($output->isDebug()) {
440+
if ($output->isVerbose()) {
441441
$output->writeLineFormatted(sprintf('Result cache was not saved because of non-ignorable exception: %s', $error->getMessage()));
442442
}
443443

@@ -447,7 +447,7 @@ public function process(AnalyserResult $analyserResult, ResultCache $resultCache
447447

448448
$this->save($resultCache->getLastFullAnalysisTime(), $errorsByFile, $locallyIgnoredErrorsByFile, $linesToIgnore, $unmatchedLineIgnores, $collectedDataByFile, $dependencies, $exportedNodes, $projectExtensionFiles, $meta);
449449

450-
if ($output->isDebug()) {
450+
if ($output->isVerbose()) {
451451
$output->writeLineFormatted('Result cache is saved.');
452452
}
453453

@@ -463,7 +463,7 @@ public function process(AnalyserResult $analyserResult, ResultCache $resultCache
463463
}
464464
$saved = $doSave($freshErrorsByFile, $freshLocallyIgnoredErrorsByFile, $analyserResult->getLinesToIgnore(), $analyserResult->getUnmatchedLineIgnores(), $freshCollectedDataByFile, $analyserResult->getDependencies(), $analyserResult->getExportedNodes(), $projectExtensionFiles);
465465
} else {
466-
if ($output->isDebug()) {
466+
if ($output->isVerbose()) {
467467
$output->writeLineFormatted('Result cache was not saved because it was not requested.');
468468
}
469469
}

src/Command/AnalyseApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function analyse(
6060
$collectedData = [];
6161
$savedResultCache = false;
6262
$memoryUsageBytes = memory_get_peak_usage(true);
63-
if ($errorOutput->isDebug()) {
63+
if ($errorOutput->isVerbose()) {
6464
$errorOutput->writeLineFormatted('Result cache was not saved because of ignoredErrorHelperResult errors.');
6565
}
6666
$changedProjectExtensionFilesOutsideOfAnalysedPaths = [];

0 commit comments

Comments
 (0)