File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 107
107
use PHPStan \PhpDoc \StubPhpDocProvider ;
108
108
use PHPStan \Reflection \Assertions ;
109
109
use PHPStan \Reflection \ClassReflection ;
110
+ use PHPStan \Reflection \ExtendedMethodReflection ;
110
111
use PHPStan \Reflection \FunctionReflection ;
111
112
use PHPStan \Reflection \InitializerExprTypeResolver ;
112
113
use PHPStan \Reflection \MethodReflection ;
@@ -527,7 +528,7 @@ private function processStmtNode(
527
528
528
529
if ($ stmt ->getAttribute ('virtual ' , false ) === false ) {
529
530
$ methodReflection = $ methodScope ->getFunction ();
530
- if (!$ methodReflection instanceof MethodReflection ) {
531
+ if (!$ methodReflection instanceof ExtendedMethodReflection ) {
531
532
throw new ShouldNotHappenException ();
532
533
}
533
534
$ nodeCallback (new InClassMethodNode ($ methodReflection , $ stmt ), $ methodScope );
Original file line number Diff line number Diff line change 3
3
namespace PHPStan \Node ;
4
4
5
5
use PhpParser \Node ;
6
- use PHPStan \Reflection \MethodReflection ;
6
+ use PHPStan \Reflection \ExtendedMethodReflection ;
7
7
8
8
/** @api */
9
9
class InClassMethodNode extends Node \Stmt implements VirtualNode
10
10
{
11
11
12
12
public function __construct (
13
- private MethodReflection $ methodReflection ,
13
+ private ExtendedMethodReflection $ methodReflection ,
14
14
private Node \Stmt \ClassMethod $ originalNode ,
15
15
)
16
16
{
17
17
parent ::__construct ($ originalNode ->getAttributes ());
18
18
}
19
19
20
- public function getMethodReflection (): MethodReflection
20
+ public function getMethodReflection (): ExtendedMethodReflection
21
21
{
22
22
return $ this ->methodReflection ;
23
23
}
You can’t perform that action at this time.
0 commit comments