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.
There is inconsistency between formatting of construct for array in long and short syntax. In project formatting I set for PHP language spaces "Within Parentheses" for "Array declaration". Result of formatting: $emptyLongArray = array(); $longArray = array( 1, 2, 3 ); $emptyShortArray = [ ]; $shortArray = [1, 2, 3 ]; What I expect: $emptyLongArray = array(); $longArray = array( 1, 2, 3 ); $emptyShortArray = []; // No space between square brackets. $shortArray = [ 1, 2, 3 ]; // Space after opening square bracket.
This problem is also present in NetBeans 8.1 RC.
Tried nightly build of NetBeans and problem is still there. Product Version: NetBeans IDE Dev (Build 201605120002) Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 System: Linux version 4.2.0-36-generic running on amd64; UTF-8; en_US (nb)
Should be fixed now, please verify. Thanks. http://hg.netbeans.org/web-main/rev/222964529b79
Integrated into 'main-silver', will be available in build *201608130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/222964529b79 User: Tomas Mysik <tmysik@netbeans.org> Log: #253093 - Wrong formatting of short array syntax with spaces within parentheses
Tested, works as expected. Thanks. Product Version: NetBeans IDE Dev (Build 201608140002) Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 System: Linux version 4.4.0-34-generic running on amd64; UTF-8; en_US (nb)
Thanks for your verification.