We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c69c8e6 commit 3026074Copy full SHA for 3026074
1 file changed
rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictParamRector.php
@@ -85,22 +85,21 @@ public function provideMinPhpVersion(): int
85
*/
86
public function refactorWithScope(Node $node, Scope $scope): ?Node
87
{
88
- if ($node->stmts === null) {
+ $stmts = $node->stmts;
89
+ if ($stmts === null) {
90
return null;
91
}
92
93
if ($this->shouldSkipNode($node)) {
94
95
96
- $return = $this->findCurrentScopeReturn($node->stmts);
97
+ $return = $this->findCurrentScopeReturn($stmts);
98
if (! $return instanceof Return_ || ! $return->expr instanceof Expr) {
99
100
101
102
$returnName = $this->getName($return->expr);
- $stmts = $node->stmts;
103
-
104
foreach ($node->getParams() as $param) {
105
if (! $param->type instanceof Node) {
106
continue;
0 commit comments