Skip to content

Commit

Permalink
Show missing format preservation when adding static modifier to closure
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored and nikic committed Sep 21, 2022
1 parent 5573afc commit 46558ed
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/code/formatPreservation/closure.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Closure add static
-----
<?php
function () {
if (rand(0, 1)) {
return true;
}

return false;
};
-----
$stmts[0]->expr->static = true;
-----
<?php
static function () {
if (rand(0, 1)) {
return true;
}

return false;
};

0 comments on commit 46558ed

Please sign in to comment.