File tree 2 files changed +2
-11
lines changed
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 6
6
use PHPStan \Analyser \Scope ;
7
7
use PHPStan \Node \InFunctionNode ;
8
8
use PHPStan \Reflection \ParametersAcceptorSelector ;
9
- use PHPStan \Reflection \Php \PhpFunctionFromParserNodeReflection ;
10
9
use PHPStan \Rules \Rule ;
11
10
use PHPStan \Rules \RuleErrorBuilder ;
12
11
use PHPStan \ShouldNotHappenException ;
@@ -28,10 +27,7 @@ public function getNodeType(): string
28
27
29
28
public function processNode (Node $ node , Scope $ scope ): array
30
29
{
31
- $ function = $ scope ->getFunction ();
32
- if (!$ function instanceof PhpFunctionFromParserNodeReflection) {
33
- return [];
34
- }
30
+ $ function = $ node ->getFunctionReflection ();
35
31
$ parameters = ParametersAcceptorSelector::selectSingle ($ function ->getVariants ());
36
32
37
33
$ errors = [];
Original file line number Diff line number Diff line change 6
6
use PHPStan \Analyser \Scope ;
7
7
use PHPStan \Node \InClassMethodNode ;
8
8
use PHPStan \Reflection \ParametersAcceptorSelector ;
9
- use PHPStan \Reflection \Php \PhpMethodFromParserNodeReflection ;
10
9
use PHPStan \Rules \Rule ;
11
10
use PHPStan \Rules \RuleErrorBuilder ;
12
11
use PHPStan \ShouldNotHappenException ;
@@ -28,11 +27,7 @@ public function getNodeType(): string
28
27
29
28
public function processNode (Node $ node , Scope $ scope ): array
30
29
{
31
- $ method = $ scope ->getFunction ();
32
- if (!$ method instanceof PhpMethodFromParserNodeReflection) {
33
- return [];
34
- }
35
-
30
+ $ method = $ node ->getMethodReflection ();
36
31
$ parameters = ParametersAcceptorSelector::selectSingle ($ method ->getVariants ());
37
32
38
33
$ errors = [];
You can’t perform that action at this time.
0 commit comments