private function groupByFile(AnalysisResult $analysisResult): array
	{
		$files = [];

		/** @var \PHPStan\Analyser\Error $fileSpecificError */
		foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
			$relativeFilePath = $this->relativePathHelper->getRelativePath(
				$fileSpecificError->getFile()
			);

			$files[$relativeFilePath][] = $fileSpecificError;
		}

		return $files;
	}