Update ProxyCallVisitor.php

This commit is contained in:
huangzhhui 2020-03-29 02:21:56 +08:00
parent 84cb8a5dab
commit 23e9c7cd3c

View File

@ -72,7 +72,6 @@ class ProxyCallVisitor extends NodeVisitorAbstract
],
]);
}
return parent::leaveNode($node);
}
public function generateStmts(Interface_ $node): array
@ -101,10 +100,9 @@ class ProxyCallVisitor extends NodeVisitorAbstract
'params' => value(function () use ($method) {
$parameters = [];
foreach ($method->getParameters() as $parameter) {
$default = $this->handleDefaultValue($parameter);
$parameters[] = new Node\Param(
new Node\Expr\Variable($parameter->getName()),
$default,
$this->handleDefaultValue($parameter),
value(function () use ($parameter) {
if ($parameter->isCallable()) {
return new Node\Identifier('callable');