From 6bd94632f2a0a6e63246d96590c2ea7464240e2f Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 12 Jun 2015 08:25:54 +0200 Subject: [PATCH] workaround wrongly quoted arginfo names --- reflection2php.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reflection2php.php b/reflection2php.php index e486012..20a1f0f 100755 --- a/reflection2php.php +++ b/reflection2php.php @@ -98,11 +98,11 @@ foreach ($namespaces as $ns) { fprintf($out, "\n\tfunction %s(", $fn); $ps = array(); foreach ($f->getParameters() as $p) { - $p1 = sfprintf($out, "%s%s\$%s", t($p), - $p->isPassedByReference()?"&":"", $p->getName()); + $p1 = sprintf("%s%s\$%s", t($p), + $p->isPassedByReference()?"&":"", trim($p->getName(), "\"")); if ($p->isOptional()) { if ($p->isDefaultValueAvailable()) { - $p1 .= sfprintf($out, " = %s", + $p1 .= sprintf(" = %s", var_export($p->getDefaultValue(), true)); } elseif (!($p->isArray() || $p->getClass()) || $p->allowsNull()) { $p1 .= " = NULL"; -- 2.30.2