File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
TypeDeclaration/NodeAnalyzer
src/NodeTypeResolver/PHPStan/Scope
tests/Issues/IssuePropertyPromoRemoveDelegatingParent/config Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 44
55namespace Rector \Php81 \NodeManipulator ;
66
7- use PHPStan \Analyser \Fiber \FiberScope ;
87use PhpParser \Node \Arg ;
98use PhpParser \Node \Expr ;
109use PhpParser \Node \Expr \Cast \Int_ as CastInt_ ;
1615use PhpParser \Node \Scalar \Int_ ;
1716use PhpParser \Node \Scalar \InterpolatedString ;
1817use PhpParser \Node \Scalar \String_ ;
18+ use PHPStan \Analyser \Fiber \FiberScope ;
1919use PHPStan \Analyser \Scope ;
2020use PHPStan \Reflection \Native \ExtendedNativeParameterReflection ;
2121use PHPStan \Reflection \ParametersAcceptor ;
Original file line number Diff line number Diff line change 1515use PHPStan \Reflection \MethodReflection ;
1616use PHPStan \Reflection \ParameterReflection ;
1717use PHPStan \Reflection \ParametersAcceptorSelector ;
18+ use PHPStan \Reflection \Php \PhpPropertyReflection ;
1819use PHPStan \Type \MixedType ;
1920use PHPStan \Type \NeverType ;
2021use PHPStan \Type \Type ;
@@ -154,7 +155,8 @@ private function areFunctionReturnsTypeSafe(FunctionLike $functionLike): bool
154155 if (
155156 $ declaredReturnType instanceof MixedType
156157 || $ declaredReturnType instanceof NeverType
157- || $ declaredReturnType ->isVoid ()->yes ()
158+ || $ declaredReturnType ->isVoid ()
159+ ->yes ()
158160 ) {
159161 return true ;
160162 }
@@ -183,7 +185,7 @@ private function isPropertyAssignSafe(Assign $assign): bool
183185 }
184186
185187 $ propertyReflection = $ this ->reflectionResolver ->resolvePropertyReflectionFromPropertyFetch ($ assign ->var );
186- if ($ propertyReflection === null ) {
188+ if (! $ propertyReflection instanceof PhpPropertyReflection ) {
187189 return false ;
188190 }
189191
Original file line number Diff line number Diff line change 44
55namespace Rector \NodeTypeResolver \PHPStan \Scope ;
66
7- use PHPStan \Analyser \Fiber \FiberScope ;
87use Error ;
98use PhpParser \Node ;
109use PhpParser \Node \Arg ;
8685use PhpParser \Node \Stmt \While_ ;
8786use PhpParser \Node \UnionType ;
8887use PhpParser \NodeTraverser ;
88+ use PHPStan \Analyser \Fiber \FiberScope ;
8989use PHPStan \Analyser \MutatingScope ;
9090use PHPStan \Analyser \NodeScopeResolver ;
9191use PHPStan \Analyser \ScopeContext ;
Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types=1 );
4+
35use Rector \Config \RectorConfig ;
46use Rector \DeadCode \Rector \ClassMethod \RemoveParentDelegatingConstructorRector ;
57use Rector \Php80 \Rector \Class_ \ClassPropertyAssignToConstructorPromotionRector ;
You can’t perform that action at this time.
0 commit comments