Skip to content

Commit e5ac6af

Browse files
committed
PhpGenerator\Helpers: ::? formats as member
1 parent 798c3cc commit e5ac6af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PhpGenerator/Helpers.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ public static function formatArgs($statement, array $args)
159159
$statement = substr_replace($statement, $arg, $a, 2);
160160

161161
} else {
162-
$arg = substr($statement, $a - 1, 1) === '$' || substr($statement, $a - 2, 2) === '->' ? self::formatMember($arg) : self::_dump($arg);
162+
$arg = substr($statement, $a - 1, 1) === '$' || in_array(substr($statement, $a - 2, 2), array('->', '::'))
163+
? self::formatMember($arg) : self::_dump($arg);
163164
$statement = substr_replace($statement, $arg, $a, 1);
164165
}
165166
$a = strpos($statement, '?', $a + strlen($arg));

0 commit comments

Comments
 (0)