mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-03 09:47:59 +01:00
98f7f39d1c
Not adding any explicit FPPP support, as I don't think add/remove of names can be handled any better than full reformatting.
39 lines
382 B
Plaintext
39 lines
382 B
Plaintext
Named arguments
|
|
-----
|
|
<?php
|
|
foo(
|
|
a: $b,
|
|
);
|
|
-----
|
|
$stmts[0]->expr->args[0]->name = null;
|
|
-----
|
|
<?php
|
|
foo(
|
|
$b,
|
|
);
|
|
-----
|
|
<?php
|
|
foo(
|
|
$b,
|
|
);
|
|
-----
|
|
$stmts[0]->expr->args[0]->name = new Node\Identifier('a');
|
|
-----
|
|
<?php
|
|
foo(
|
|
a: $b,
|
|
);
|
|
-----
|
|
<?php
|
|
foo(
|
|
a:
|
|
$b,
|
|
);
|
|
-----
|
|
$stmts[0]->expr->args[0]->name = new Node\Identifier('XYZ');
|
|
-----
|
|
<?php
|
|
foo(
|
|
XYZ:
|
|
$b,
|
|
); |