@@ -92,21 +92,21 @@ public function restore(array $allAnalysedFiles, bool $debug, bool $onlyFiles, ?
9292 {
9393 $ startTime = microtime (true );
9494 if ($ debug ) {
95- if ($ output ->isVerbose ()) {
95+ if ($ output ->isVeryVerbose ()) {
9696 $ output ->writeLineFormatted ('Result cache not used because of debug mode. ' );
9797 }
9898 return new ResultCache ($ allAnalysedFiles , true , time (), $ this ->getMeta ($ allAnalysedFiles , $ projectConfigArray ), [], [], [], [], [], [], [], []);
9999 }
100100 if ($ onlyFiles ) {
101- if ($ output ->isVerbose ()) {
101+ if ($ output ->isVeryVerbose ()) {
102102 $ output ->writeLineFormatted ('Result cache not used because only files were passed as analysed paths. ' );
103103 }
104104 return new ResultCache ($ allAnalysedFiles , true , time (), $ this ->getMeta ($ allAnalysedFiles , $ projectConfigArray ), [], [], [], [], [], [], [], []);
105105 }
106106
107107 $ cacheFilePath = $ this ->cacheFilePath ;
108108 if (!is_file ($ cacheFilePath )) {
109- if ($ output ->isVerbose ()) {
109+ if ($ output ->isVeryVerbose ()) {
110110 $ output ->writeLineFormatted ('Result cache not used because the cache file does not exist. ' );
111111 }
112112 return new ResultCache ($ allAnalysedFiles , true , time (), $ this ->getMeta ($ allAnalysedFiles , $ projectConfigArray ), [], [], [], [], [], [], [], []);
@@ -115,7 +115,7 @@ public function restore(array $allAnalysedFiles, bool $debug, bool $onlyFiles, ?
115115 try {
116116 $ data = require $ cacheFilePath ;
117117 } catch (Throwable $ e ) {
118- if ($ output ->isVerbose ()) {
118+ if ($ output ->isVeryVerbose ()) {
119119 $ output ->writeLineFormatted (sprintf ('Result cache not used because an error occurred while loading the cache file: %s ' , $ e ->getMessage ()));
120120 }
121121
@@ -126,7 +126,7 @@ public function restore(array $allAnalysedFiles, bool $debug, bool $onlyFiles, ?
126126
127127 if (!is_array ($ data )) {
128128 @unlink ($ cacheFilePath );
129- if ($ output ->isVerbose ()) {
129+ if ($ output ->isVeryVerbose ()) {
130130 $ output ->writeLineFormatted ('Result cache not used because the cache file is corrupted. ' );
131131 }
132132
@@ -135,15 +135,15 @@ public function restore(array $allAnalysedFiles, bool $debug, bool $onlyFiles, ?
135135
136136 $ meta = $ this ->getMeta ($ allAnalysedFiles , $ projectConfigArray );
137137 if ($ this ->isMetaDifferent ($ data ['meta ' ], $ meta )) {
138- if ($ output ->isVerbose ()) {
138+ if ($ output ->isVeryVerbose ()) {
139139 $ diffs = $ this ->getMetaKeyDifferences ($ data ['meta ' ], $ meta );
140140 $ output ->writeLineFormatted ('Result cache not used because the metadata do not match: ' . implode (', ' , $ diffs ));
141141 }
142142 return new ResultCache ($ allAnalysedFiles , true , time (), $ meta , [], [], [], [], [], [], [], []);
143143 }
144144
145145 if (time () - $ data ['lastFullAnalysisTime ' ] >= 60 * 60 * 24 * 7 ) {
146- if ($ output ->isVerbose ()) {
146+ if ($ output ->isVeryVerbose ()) {
147147 $ output ->writeLineFormatted ('Result cache not used because it \'s more than 7 days since last full analysis. ' );
148148 }
149149 // run full analysis if the result cache is older than 7 days
@@ -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 ->isVerbose ()) {
415+ if ($ output ->isVeryVerbose ()) {
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 ->isVerbose ()) {
421+ if ($ output ->isVeryVerbose ()) {
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 ->isVerbose ()) {
428+ if ($ output ->isVeryVerbose ()) {
429429 $ output ->writeLineFormatted ('Result cache was not saved because of internal errors. ' );
430430 }
431431 return false ;
@@ -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 ->isVerbose ()) {
450+ if ($ output ->isVeryVerbose ()) {
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 ->isVerbose ()) {
466+ if ($ output ->isVeryVerbose ()) {
467467 $ output ->writeLineFormatted ('Result cache was not saved because it was not requested. ' );
468468 }
469469 }
0 commit comments