pretty-php
pretty-php copied to clipboard
Consider changes to code style inspired by review of PHP Parser test fixtures
-
[ ] Don't move comments to the other side of empty statements?
-
[ ] Relax enforcement of class attributes on their own line when the class is a one-line and/or anonymous class?
-
[ ] Expand this
<?php [ $foo,,, $bar, $baz, ] = $data;to this?
<?php [ $foo, , , $bar, $baz, ] = $data; -
[ ] Improve tag indentation in this scenario:
<?php function test() { ?> Test <?php } -
[x] ~~Suppress
.0in floats with an exponent, e.g.3.0e5?~~ -
[x] Remove leading space from
&infn &() => nullfor consistency withfn() => null -
[x] Check formatting of
declareblocks without braces -
[x] Review switch indentation? e.g.
<?php switch ($a) { case 0: break; // Deindent this after `break`/`return`/`throw`? case 1: default: break; } -
[x] Handle leading semicolons in switches
<?php switch ($a) { ; }