Drop whitespace after ... varargs collection

Also drop an obsolete pretty printer test.
This commit is contained in:
Nikita Popov 2015-03-12 22:18:51 +01:00
parent 3ad0d4b310
commit dc28449d81
3 changed files with 5 additions and 26 deletions

View File

@ -20,7 +20,7 @@ class Standard extends PrettyPrinterAbstract
public function pParam(Node\Param $node) {
return ($node->type ? $this->pType($node->type) . ' ' : '')
. ($node->byRef ? '&' : '')
. ($node->variadic ? '... ' : '')
. ($node->variadic ? '...' : '')
. '$' . $node->name
. ($node->default ? ' = ' . $this->p($node->default) : '');
}

View File

@ -31,12 +31,12 @@ interface A
function f4(array $a);
function f5(callable $a);
function f6(&$a);
function f7(... $a);
function f8(&... $a);
function f7(...$a);
function f8(&...$a);
function f9(A &$a);
function f10(A ... $a);
function f10(A ...$a);
function f11(A &$a);
function f12(A &... $a);
function f12(A &...$a);
function f13($a) : array;
function f14($a) : callable;
function f15($a) : B\C;

View File

@ -1,21 +0,0 @@
Function parameters
-----
<?php
function test($a, &$b, Type $c, Type &$c, Type &... $d) {}
function test(... $foo) {}
function test(Type ... $foo) {}
function test(&... $foo) {}
-----
function test($a, &$b, Type $c, Type &$c, Type &... $d)
{
}
function test(... $foo)
{
}
function test(Type ... $foo)
{
}
function test(&... $foo)
{
}