File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 66use PHPStan \Analyser \Scope ;
77use PHPStan \Node \InFunctionNode ;
88use PHPStan \Reflection \ParametersAcceptorSelector ;
9- use PHPStan \Reflection \Php \PhpFunctionFromParserNodeReflection ;
109use PHPStan \Rules \Rule ;
1110use PHPStan \Rules \RuleErrorBuilder ;
1211use PHPStan \ShouldNotHappenException ;
@@ -28,10 +27,7 @@ public function getNodeType(): string
2827
2928 public function processNode (Node $ node , Scope $ scope ): array
3029 {
31- $ function = $ scope ->getFunction ();
32- if (!$ function instanceof PhpFunctionFromParserNodeReflection) {
33- return [];
34- }
30+ $ function = $ node ->getFunctionReflection ();
3531 $ parameters = ParametersAcceptorSelector::selectSingle ($ function ->getVariants ());
3632
3733 $ errors = [];
Original file line number Diff line number Diff line change 66use PHPStan \Analyser \Scope ;
77use PHPStan \Node \InClassMethodNode ;
88use PHPStan \Reflection \ParametersAcceptorSelector ;
9- use PHPStan \Reflection \Php \PhpMethodFromParserNodeReflection ;
109use PHPStan \Rules \Rule ;
1110use PHPStan \Rules \RuleErrorBuilder ;
1211use PHPStan \ShouldNotHappenException ;
@@ -28,11 +27,7 @@ public function getNodeType(): string
2827
2928 public function processNode (Node $ node , Scope $ scope ): array
3029 {
31- $ method = $ scope ->getFunction ();
32- if (!$ method instanceof PhpMethodFromParserNodeReflection) {
33- return [];
34- }
35-
30+ $ method = $ node ->getMethodReflection ();
3631 $ parameters = ParametersAcceptorSelector::selectSingle ($ method ->getVariants ());
3732
3833 $ errors = [];
You can’t perform that action at this time.
0 commit comments