Skip to content

Commit 01a7897

Browse files
committed
InClassMethodNode always contains PhpMethodFromParserNodeReflection
1 parent 0264f5b commit 01a7897

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: src/Analyser/NodeScopeResolver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
use PHPStan\PhpDoc\Tag\VarTag;
111111
use PHPStan\Reflection\Assertions;
112112
use PHPStan\Reflection\ClassReflection;
113-
use PHPStan\Reflection\ExtendedMethodReflection;
114113
use PHPStan\Reflection\FunctionReflection;
115114
use PHPStan\Reflection\InitializerExprTypeResolver;
116115
use PHPStan\Reflection\MethodReflection;
@@ -119,6 +118,7 @@
119118
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
120119
use PHPStan\Reflection\ParametersAcceptor;
121120
use PHPStan\Reflection\ParametersAcceptorSelector;
121+
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
122122
use PHPStan\Reflection\Php\PhpMethodReflection;
123123
use PHPStan\Reflection\ReflectionProvider;
124124
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
@@ -544,7 +544,7 @@ private function processStmtNode(
544544

545545
if ($stmt->getAttribute('virtual', false) === false) {
546546
$methodReflection = $methodScope->getFunction();
547-
if (!$methodReflection instanceof ExtendedMethodReflection) {
547+
if (!$methodReflection instanceof PhpMethodFromParserNodeReflection) {
548548
throw new ShouldNotHappenException();
549549
}
550550
$nodeCallback(new InClassMethodNode($scope->getClassReflection(), $methodReflection, $stmt), $methodScope);

Diff for: src/Node/InClassMethodNode.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
use PhpParser\Node;
66
use PHPStan\Reflection\ClassReflection;
7-
use PHPStan\Reflection\ExtendedMethodReflection;
7+
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
88

99
/** @api */
1010
class InClassMethodNode extends Node\Stmt implements VirtualNode
1111
{
1212

1313
public function __construct(
1414
private ClassReflection $classReflection,
15-
private ExtendedMethodReflection $methodReflection,
15+
private PhpMethodFromParserNodeReflection $methodReflection,
1616
private Node\Stmt\ClassMethod $originalNode,
1717
)
1818
{
@@ -24,7 +24,7 @@ public function getClassReflection(): ClassReflection
2424
return $this->classReflection;
2525
}
2626

27-
public function getMethodReflection(): ExtendedMethodReflection
27+
public function getMethodReflection(): PhpMethodFromParserNodeReflection
2828
{
2929
return $this->methodReflection;
3030
}

0 commit comments

Comments
 (0)