Skip to content

Commit f4eec8f

Browse files
committed
Merge branch '3.x' into 4.x
2 parents 2be96e1 + c052692 commit f4eec8f

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"php": "^8.3",
1818
"nunomaduro/pokio": "^0.1.0",
1919
"pestphp/pest-plugin": "^4.0.0",
20-
"phpstan/phpstan": "^1.12.24|^2.1.17",
20+
"phpstan/phpstan": "^1.12.24|^2.1.18",
2121
"tomasvotruba/type-coverage": "^1.0.0|^2.0.2"
2222
},
2323
"autoload": {

src/TestCaseForTypeCoverage.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public function gatherAnalyserErrors(array $files): array
101101

102102
$actualErrors = $analyserResult->getUnorderedErrors();
103103

104-
$ruleErrorTransformer = new RuleErrorTransformer;
104+
$ruleErrorTransformer = self::getContainer()->getByType(RuleErrorTransformer::class);
105+
105106
if ($analyserResult->getCollectedData() !== []) {
106107
$ruleRegistry = new DirectRegistry($this->getRules());
107108
$nodeType = CollectedDataNode::class;
@@ -112,12 +113,12 @@ public function gatherAnalyserErrors(array $files): array
112113
$ruleErrors = $rule->processNode($node, $scope);
113114
foreach ($ruleErrors as $ruleError) {
114115
if ($this->ignored($ruleError)) {
115-
$this->ignoredErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
116+
$this->ignoredErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, [], $node);
116117

117118
continue;
118119
}
119120

120-
$actualErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
121+
$actualErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, [], $node);
121122
}
122123
}
123124
}

0 commit comments

Comments
 (0)