Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 11, 2023
1 parent 91b3f22 commit d587951
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,8 @@ public function refactor(Node $node): ?Node
return null;
}

if (! $node instanceof ClassMethod) {
// in closure and arrow function can't add `@return null` docblock as they are Expr
// that rely on Stmt
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);
$this->phpDocTypeChanger->changeReturnType($node, $phpDocInfo, $this->resolveType($node->returnType));

$node->returnType = $this->resolveNativeType($node, $node->returnType);
return $node;
}

// in closure and arrow function can't add `@return null` docblock as they are Expr
// that rely on Stmt
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);
$this->phpDocTypeChanger->changeReturnType($node, $phpDocInfo, $this->resolveType($node->returnType));

Expand Down

0 comments on commit d587951

Please sign in to comment.