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.

Bug 268192

Summary: Grouping Alignment of Multiline array assigments with spaces instead of tabs.
Product: php Reporter: arnisraido
Component: Formatting & IndentationAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal CC: arnisraido
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:

Description arnisraido 2016-09-25 12:24:34 UTC
In Netbeans Editor > Formatting -> PHP - > Alignment, there is great feature:

Group Multiline Alignment
[] "Array Initializer"

If its "checked", then arrays in PHP from this:

~~~
$data = array(
	'product_id' => $product_id,
	'name' => $name,	
);
~~~

will become "group aligned", with TAB characters in the middle:

~~~
$data = array(
	'product_id'	=> $product_id,
	'name'		=> $name,	
);
~~~

But this is a problem - TAB character size can be different when using different settings or editors. This is why usually alignment around " => " should be done with empty spaces, not TABs.

At lease - there should be a setting for this?