Skip to content

Commit c052692

Browse files
authored
Merge pull request #52 from faissaloux/phpstan-2.1.18
Support phpstan v2.1.18
2 parents dff0a51 + 87561c9 commit c052692

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"license": "MIT",
1616
"require": {
1717
"php": "^8.2",
18-
"phpstan/phpstan": "^1.12.21|^2.1.17",
18+
"phpstan/phpstan": "^1.12.21|^2.1.18",
1919
"tomasvotruba/type-coverage": "^1.0.0|^2.0.2",
2020
"pestphp/pest-plugin": "^3.0.0"
2121
},

src/TestCaseForTypeCoverage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function gatherAnalyserErrors(array $files): array
110110
}
111111

112112
$actualErrors = $analyserResult->getUnorderedErrors();
113-
$ruleErrorTransformer = new RuleErrorTransformer;
113+
$ruleErrorTransformer = self::getContainer()->getByType(RuleErrorTransformer::class);
114114
if ($analyserResult->getCollectedData() !== []) {
115115
$ruleRegistry = new DirectRegistry($this->getRules());
116116
$nodeType = CollectedDataNode::class;
@@ -121,12 +121,12 @@ public function gatherAnalyserErrors(array $files): array
121121
$ruleErrors = $rule->processNode($node, $scope);
122122
foreach ($ruleErrors as $ruleError) {
123123
if ($this->ignored($ruleError)) {
124-
$this->ignoredErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
124+
$this->ignoredErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, [], $node);
125125

126126
continue;
127127
}
128128

129-
$actualErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getLine());
129+
$actualErrors[] = $ruleErrorTransformer->transform($ruleError, $scope, [], $node);
130130
}
131131
}
132132
}

0 commit comments

Comments
 (0)