diff --git a/src/Command/AnalysisResult.php b/src/Command/AnalysisResult.php index 1697b5f38a..ad7162b32b 100644 --- a/src/Command/AnalysisResult.php +++ b/src/Command/AnalysisResult.php @@ -148,4 +148,25 @@ public function getChangedProjectExtensionFilesOutsideOfAnalysedPaths(): array return $this->changedProjectExtensionFilesOutsideOfAnalysedPaths; } + /** + * @api + * @param list $fileSpecificErrors + */ + public function withFileSpecificErrors(array $fileSpecificErrors): self + { + return new self( + $fileSpecificErrors, + $this->notFileSpecificErrors, + $this->internalErrors, + $this->warnings, + $this->collectedData, + $this->defaultLevelUsed, + $this->projectConfigFile, + $this->savedResultCache, + $this->peakMemoryUsageBytes, + $this->isResultCacheUsed, + $this->changedProjectExtensionFilesOutsideOfAnalysedPaths, + ); + } + }