diff --git a/src/Data/ProcessedCodeCoverageData.php b/src/Data/ProcessedCodeCoverageData.php index 976aaab38..49a103236 100644 --- a/src/Data/ProcessedCodeCoverageData.php +++ b/src/Data/ProcessedCodeCoverageData.php @@ -41,6 +41,7 @@ * }> * } * @phpstan-type FunctionCoverageType array> + * @phpstan-type LineCoverageType array>> */ final class ProcessedCodeCoverageData { @@ -48,7 +49,7 @@ final class ProcessedCodeCoverageData * Line coverage data. * An array of filenames, each having an array of linenumbers, each executable line having an array of testcase ids. * - * @var array>> + * @var LineCoverageType */ private array $lineCoverage = []; @@ -111,11 +112,17 @@ public function markCodeAsExecutedByTestCase(string $testCaseId, RawCodeCoverage } } + /** + * @param LineCoverageType $lineCoverage + */ public function setLineCoverage(array $lineCoverage): void { $this->lineCoverage = $lineCoverage; } + /** + * @return LineCoverageType + */ public function lineCoverage(): array { ksort($this->lineCoverage); @@ -123,11 +130,17 @@ public function lineCoverage(): array return $this->lineCoverage; } + /** + * @param FunctionCoverageType $functionCoverage + */ public function setFunctionCoverage(array $functionCoverage): void { $this->functionCoverage = $functionCoverage; } + /** + * @return FunctionCoverageType + */ public function functionCoverage(): array { ksort($this->functionCoverage); @@ -135,6 +148,9 @@ public function functionCoverage(): array return $this->functionCoverage; } + /** + * @return array + */ public function coveredFiles(): array { ksort($this->lineCoverage);