2017-11-04 17:23:17 +01:00
|
|
|
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,
|
2017-12-26 21:13:56 +01:00
|
|
|
$b,
|
|
|
|
$x,
|
|
|
|
$y
|
2019-10-25 21:35:43 +02:00
|
|
|
) {}
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
function test(): A
|
|
|
|
|B
|
|
|
|
|C {}
|
|
|
|
-----
|
|
|
|
array_pop($stmts[0]->returnType->types);
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
function test(): A
|
|
|
|
|B {}
|