From 762277ecee45389ca7637a9b45cc4513d1a282bd Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Sat, 14 Mar 2020 15:28:40 +0100 Subject: [PATCH] Result cache - do not save with non-ignorable errors --- src/Analyser/ResultCache/ResultCacheManager.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Analyser/ResultCache/ResultCacheManager.php b/src/Analyser/ResultCache/ResultCacheManager.php index 20c37d8fd6..6531578c07 100644 --- a/src/Analyser/ResultCache/ResultCacheManager.php +++ b/src/Analyser/ResultCache/ResultCacheManager.php @@ -187,6 +187,16 @@ public function process(AnalyserResult $analyserResult, ResultCache $resultCache return; } + foreach ($errorsByFile as $errors) { + foreach ($errors as $error) { + if ($error->canBeIgnored()) { + continue; + } + + return; + } + } + $this->save($resultCache->getLastFullAnalysisTime(), $errorsByFile, $dependencies); };