File tree Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 3838/**
3939 * Provides collection functionality for PHP code coverage information.
4040 *
41- * @phpstan-type TestType array{
42- * size: string,
43- * status: string,
44- * }
41+ * @phpstan-type TestType array{size: string, status: string}
42+ * @phpstan-type TargetedLines array<non-empty-string, list<positive-int>>
4543 */
4644final class CodeCoverage
4745{
@@ -374,6 +372,9 @@ public function validate(TargetCollection $targets): ValidationResult
374372 }
375373
376374 /**
375+ * @param false|TargetedLines $linesToBeCovered
376+ * @param TargetedLines $linesToBeUsed
377+ *
377378 * @throws ReflectionException
378379 * @throws UnintentionallyCoveredCodeException
379380 */
@@ -478,6 +479,9 @@ private function addUncoveredFilesFromFilter(): void
478479 }
479480
480481 /**
482+ * @param TargetedLines $linesToBeCovered
483+ * @param TargetedLines $linesToBeUsed
484+ *
481485 * @throws ReflectionException
482486 * @throws UnintentionallyCoveredCodeException
483487 */
@@ -507,6 +511,12 @@ private function performUnintentionallyCoveredCodeCheck(RawCodeCoverageData $dat
507511 }
508512 }
509513
514+ /**
515+ * @param TargetedLines $linesToBeCovered
516+ * @param TargetedLines $linesToBeUsed
517+ *
518+ * @return TargetedLines
519+ */
510520 private function getAllowedLines (array $ linesToBeCovered , array $ linesToBeUsed ): array
511521 {
512522 $ allowedLines = [];
Original file line number Diff line number Diff line change @@ -261,6 +261,9 @@ private function skipEmptyLines(): void
261261 }
262262 }
263263
264+ /**
265+ * @return array<int>
266+ */
264267 private function getEmptyLinesForFile (string $ filename ): array
265268 {
266269 if (!isset (self ::$ emptyLineCache [$ filename ])) {
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ abstract class AbstractNode implements Countable
2929{
3030 private readonly string $ name ;
3131 private string $ pathAsString ;
32+
33+ /**
34+ * @var non-empty-list<self>
35+ */
3236 private array $ pathAsArray ;
3337 private readonly ?AbstractNode $ parent ;
3438 private string $ id ;
@@ -61,6 +65,9 @@ public function pathAsString(): string
6165 return $ this ->pathAsString ;
6266 }
6367
68+ /**
69+ * @return non-empty-list<self>
70+ */
6471 public function pathAsArray (): array
6572 {
6673 return $ this ->pathAsArray ;
Original file line number Diff line number Diff line change 1414use RecursiveIterator ;
1515
1616/**
17+ * @template-implements RecursiveIterator<int, AbstractNode>
18+ *
1719 * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
1820 */
1921final class Iterator implements RecursiveIterator
You can’t perform that action at this time.
0 commit comments