|
84 | 84 | use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection; |
85 | 85 | use PHPStan\Reflection\PropertyReflection; |
86 | 86 | use PHPStan\Reflection\ReflectionProvider; |
87 | | -use PHPStan\Reflection\TrivialParametersAcceptor; |
88 | 87 | use PHPStan\Rules\Properties\PropertyReflectionFinder; |
89 | 88 | use PHPStan\ShouldNotHappenException; |
90 | 89 | use PHPStan\TrinaryLogic; |
@@ -237,7 +236,7 @@ public function __construct( |
237 | 236 | private array $nativeExpressionTypes = [], |
238 | 237 | private array $conditionalExpressions = [], |
239 | 238 | private array $inClosureBindScopeClasses = [], |
240 | | - private ?ParametersAcceptor $anonymousFunctionReflection = null, |
| 239 | + private ?ClosureType $anonymousFunctionReflection = null, |
241 | 240 | private bool $inFirstLevelStatement = true, |
242 | 241 | private array $currentlyAssignedExpressions = [], |
243 | 242 | private array $currentlyAllowedUndefinedExpressions = [], |
@@ -754,7 +753,7 @@ public function isInAnonymousFunction(): bool |
754 | 753 | } |
755 | 754 |
|
756 | 755 | /** @api */ |
757 | | - public function getAnonymousFunctionReflection(): ?ParametersAcceptor |
| 756 | + public function getAnonymousFunctionReflection(): ?ClosureType |
758 | 757 | { |
759 | 758 | return $this->anonymousFunctionReflection; |
760 | 759 | } |
@@ -3900,7 +3899,7 @@ private function enterAnonymousFunctionWithoutReflection( |
3900 | 3899 | array_merge($this->getNativeConstantTypes(), $nativeTypes), |
3901 | 3900 | [], |
3902 | 3901 | $this->inClosureBindScopeClasses, |
3903 | | - new TrivialParametersAcceptor(), |
| 3902 | + new ClosureType(), |
3904 | 3903 | true, |
3905 | 3904 | [], |
3906 | 3905 | [], |
@@ -4027,7 +4026,7 @@ private function enterArrowFunctionWithoutReflection(Expr\ArrowFunction $arrowFu |
4027 | 4026 | $arrowFunctionScope->nativeExpressionTypes, |
4028 | 4027 | $arrowFunctionScope->conditionalExpressions, |
4029 | 4028 | $arrowFunctionScope->inClosureBindScopeClasses, |
4030 | | - new TrivialParametersAcceptor(), |
| 4029 | + new ClosureType(), |
4031 | 4030 | true, |
4032 | 4031 | [], |
4033 | 4032 | [], |
|
0 commit comments