mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-15 02:16:56 +01:00
664c10121e
We definitely need to introduce a general "Type" abstraction in the next major version.
52 lines
652 B
Plaintext
52 lines
652 B
Plaintext
Removing from list nodes
|
|
-----
|
|
<?php $foo; $bar; $baz;
|
|
-----
|
|
array_splice($stmts, 1, 1, []);
|
|
-----
|
|
<?php $foo; $baz;
|
|
-----
|
|
<?php
|
|
function foo(
|
|
$a,
|
|
$b,
|
|
$c
|
|
) {}
|
|
-----
|
|
array_pop($stmts[0]->params);
|
|
-----
|
|
<?php
|
|
function foo(
|
|
$a,
|
|
$b
|
|
) {}
|
|
-----
|
|
<?php
|
|
function foo(
|
|
$a,
|
|
$b,
|
|
$c
|
|
) {}
|
|
-----
|
|
array_pop($stmts[0]->params);
|
|
$stmts[0]->params[] = new Node\Param(new Expr\Variable('x'));
|
|
$stmts[0]->params[] = new Node\Param(new Expr\Variable('y'));
|
|
-----
|
|
<?php
|
|
function foo(
|
|
$a,
|
|
$b,
|
|
$x,
|
|
$y
|
|
) {}
|
|
-----
|
|
<?php
|
|
function test(): A
|
|
|B
|
|
|C {}
|
|
-----
|
|
array_pop($stmts[0]->returnType->types);
|
|
-----
|
|
<?php
|
|
function test(): A
|
|
|B {} |