2525 * @phpstan-import-type XdebugFunctionCoverageType from XdebugDriver
2626 *
2727 * @phpstan-type TestIdType = string
28+ *
29+ * @phpstan-type FunctionCoverageDataType array{
30+ * branches: array<int, array{
31+ * op_start: int,
32+ * op_end: int,
33+ * line_start: int,
34+ * line_end: int,
35+ * hit: list<TestIdType>,
36+ * out: array<int, int>,
37+ * out_hit: array<int, int>,
38+ * }>,
39+ * paths: array<int, array{
40+ * path: array<int, int>,
41+ * hit: list<TestIdType>,
42+ * }>,
43+ * hit: list<TestIdType>
44+ * }
45+ *
46+ * @phpstan-type FunctionCoverageType array<string, array<string, FunctionCoverageDataType> >
47+ >>>>>>> Stashed changes
2848 */
2949final class ProcessedCodeCoverageData
3050{
@@ -41,22 +61,7 @@ final class ProcessedCodeCoverageData
4161 * Maintains base format of raw data (@see https://xdebug.org/docs/code_coverage), but each 'hit' entry is an array
4262 * of testcase ids.
4363 *
44- * @var array<string, array<string, array{
45- * branches: array<int, array{
46- * op_start: int,
47- * op_end: int,
48- * line_start: int,
49- * line_end: int,
50- * hit: list<TestIdType>,
51- * out: array<int, int>,
52- * out_hit: array<int, int>,
53- * }>,
54- * paths: array<int, array{
55- * path: array<int, int>,
56- * hit: list<TestIdType>,
57- * }>,
58- * hit: list<TestIdType>
59- * }>>
64+ * @var FunctionCoverageType
6065 */
6166 private array $ functionCoverage = [];
6267
@@ -238,7 +243,7 @@ private function priorityForLine(array $data, int $line): int
238243 /**
239244 * For a function we have never seen before, copy all data over and simply init the 'hit' array.
240245 *
241- * @param XdebugFunctionCoverageType $functionData
246+ * @param XdebugFunctionCoverageType|FunctionCoverageDataType $functionData
242247 */
243248 private function initPreviouslyUnseenFunction (string $ file , string $ functionName , array $ functionData ): void
244249 {
@@ -258,7 +263,7 @@ private function initPreviouslyUnseenFunction(string $file, string $functionName
258263 * Techniques such as mocking and where the contents of a file are different vary during tests (e.g. compiling
259264 * containers) mean that the functions inside a file cannot be relied upon to be static.
260265 *
261- * @param XdebugFunctionCoverageType $functionData
266+ * @param XdebugFunctionCoverageType|FunctionCoverageDataType $functionData
262267 */
263268 private function initPreviouslySeenFunction (string $ file , string $ functionName , array $ functionData ): void
264269 {
0 commit comments