1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
Indentation
-----
<?php
$x;
-----
$stmts[0] = new Stmt\If_(new Expr\Variable('a'), ['stmts' => $stmts]);
-----
!!indent=" "
<?php
if ($a) {
$x;
}
-----
<?php
$x;
-----
$stmts[0] = new Stmt\If_(new Expr\Variable('a'), ['stmts' => $stmts]);
-----
!!indent="\t"
<?php
if ($a) {
@@{"\t"}@@$x;
}
-----
<?php
if ($a) {
@@{"\t"}@@$x;
}
-----
$stmts[0]->stmts[] = new Stmt\Expression(new Expr\Variable('y'));
-----
!!indent="\t"
<?php
if ($a) {
@@{"\t"}@@$x;
@@{"\t"}@@$y;
}
-----
<?php
array_merge(
[
$x,
$y,
]
);
-----
$call = $stmts[0]->expr;
$stmts[0]->expr = new Expr\StaticCall(new Node\Name\FullyQualified('Compat'), $call->name, $call->args);
-----
<?php
\Compat::array_merge([
$x,
$y,
]);
-----
<?php
if ($a) {
if (
$b
) {}
}
-----
$stmts[0] = new Stmt\While_($stmts[0]->cond, $stmts[0]->stmts);
-----
<?php
while ($a) {
if (
$b
) {}
}
|