Skip to content

Commit d7a37f1

Browse files
committed
PHP 5.6 syntax
1 parent cd52269 commit d7a37f1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/PhpGenerator/Helpers.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ private static function _dump(& $var, $level = 0)
135135
* Generates PHP statement.
136136
* @return string
137137
*/
138-
public static function format($statement)
138+
public static function format($statement, ...$args)
139139
{
140-
$args = func_get_args();
141-
return self::formatArgs(array_shift($args), $args);
140+
return self::formatArgs($statement, $args);
142141
}
143142

144143

src/PhpGenerator/Method.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function from($from)
8080
$method->body = $from->isAbstract() ? FALSE : '';
8181
}
8282
$method->returnReference = $from->returnsReference();
83-
$method->variadic = PHP_VERSION_ID >= 50600 && $from->isVariadic();
83+
$method->variadic = $from->isVariadic();
8484
$method->comment = $from->getDocComment() ? preg_replace('#^\s*\* ?#m', '', trim($from->getDocComment(), "/* \r\n\t")) : NULL;
8585
if (PHP_VERSION_ID >= 70000 && $from->hasReturnType()) {
8686
$method->returnType = (string) $from->getReturnType();

0 commit comments

Comments
 (0)