projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix missing files in package.xml; [ci skip]
[m6w6/ext-http]
/
reflection2php.php
diff --git
a/reflection2php.php
b/reflection2php.php
index e486012037fde36f229a296b06431137e7277a49..20a1f0fdd853b35d459090e1a43f33a3e4d6cbf2 100755
(executable)
--- 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) {
fprintf($out, "\n\tfunction %s(", $fn);
$ps = array();
foreach ($f->getParameters() as $p) {
- $p1 = s
fprintf($out,
"%s%s\$%s", t($p),
- $p->isPassedByReference()?"&":"",
$p->getName(
));
+ $p1 = s
printf(
"%s%s\$%s", t($p),
+ $p->isPassedByReference()?"&":"",
trim($p->getName(), "\""
));
if ($p->isOptional()) {
if ($p->isDefaultValueAvailable()) {
if ($p->isOptional()) {
if ($p->isDefaultValueAvailable()) {
- $p1 .= s
fprintf($out,
" = %s",
+ $p1 .= s
printf(
" = %s",
var_export($p->getDefaultValue(), true));
} elseif (!($p->isArray() || $p->getClass()) || $p->allowsNull()) {
$p1 .= " = NULL";
var_export($p->getDefaultValue(), true));
} elseif (!($p->isArray() || $p->getClass()) || $p->allowsNull()) {
$p1 .= " = NULL";