Skip to content

Commit 34bfdc7

Browse files
committed
Improve tip in ScopeGetTypeInGeneratorNamespaceRule
1 parent 25de2cf commit 34bfdc7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build/PHPStan/Build/ScopeGetTypeInGeneratorNamespaceRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function processNode(Node $node, Scope $scope): array
7070
$invalidNamespace,
7171
))
7272
->identifier('phpstan.scopeGetType')
73-
->tip('Use new ExprAnalysisRequest instead.')
73+
->tip('Use yield new ExprAnalysisRequest or query the ExprAnalysisResultStorage instead.')
7474
->build(),
7575
];
7676
}

tests/PHPStan/Build/ScopeGetTypeInGeneratorNamespaceRuleTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ public function testRule(): void
2222
[
2323
'Scope::getType() cannot be called in PHPStan\Analyser\Generator namespace.',
2424
27,
25-
'Use new ExprAnalysisRequest instead.',
25+
'Use yield new ExprAnalysisRequest or query the ExprAnalysisResultStorage instead.',
2626
],
2727
[
2828
'Scope::getType() cannot be called in PHPStan\Analyser\Generator namespace.',
2929
43,
30-
'Use new ExprAnalysisRequest instead.',
30+
'Use yield new ExprAnalysisRequest or query the ExprAnalysisResultStorage instead.',
3131
],
3232
[
3333
'Scope::getType() cannot be called in PHPStan\Analyser\Generator namespace.',
3434
48,
35-
'Use new ExprAnalysisRequest instead.',
35+
'Use yield new ExprAnalysisRequest or query the ExprAnalysisResultStorage instead.',
3636
],
3737
[
3838
'Scope::getNativeType() cannot be called in PHPStan\Analyser\Generator namespace.',
3939
49,
40-
'Use new ExprAnalysisRequest instead.',
40+
'Use yield new ExprAnalysisRequest or query the ExprAnalysisResultStorage instead.',
4141
],
4242
]);
4343
}

0 commit comments

Comments
 (0)