This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
First off, the php formatting is GREAT! I love it, my only request would be for certain code you add extra white space to align bulk assignments, or a large associative array initialization. It would be great to add a preserve-existing option to these boolean flags. Then I could keep code like the following when running the formatter: <?php $myArray = array( 'val1' => 1, 'another_value' => 2, 'short' => 3 ); $firstname = $_POST['fname']; $age = $_POST['age']; // etc ?>
Definitely agree. Really like all the new options. But I especially want a "Preserve" option for the Wrapping category. I often write statements (usually printf stuff) with many arguments like <?php $out = sprintf("This %s will be %s. %s", $toyName, $status, (!empty($t['property_statement']) ? $t['property_statement'] : '') ); ?> When there are many arguments, and each argument can be complicated, I prefer to have them on separate lines as above. But setting the option for Method Call Arguments to "If Long" doesn't preserve the new lines for each argument. And if I set it to "Always" then it's silly for normal, small method calls.
The option should work the same as the 'Preserve Existing' option within the 'Braces' category. Sebastian
This problem is still existing in v. 8.0.2. It's particularly nasty with bind_param() because it's a generally long method and the 3 choices given by the formatting option are all bad. Never: unprintable 2 Km line Always: eats an entire page If long: is the only acceptable one but it doesn't honor perfectly the right margin. Moreover it doesn't work properly if the code is alredy formatted the JS way such as $stm->bind_param( 'isissiisiiiiissssssddssis', $u... ) In any case, none of the above format the code the way I would do. I don't understand why the simplest of the choices "Preserve" doesn't exist! It would only have to do NOTHING! It's so difficult doing nothing? :-)
Same problem on NB version 8.1