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 267695

Summary: Wrapping for array initializer 'Never' does not remove wrapping
Product: php Reporter: SebastianZ
Component: Formatting & IndentationAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description SebastianZ 2016-08-25 08:16:46 UTC
When the option 'Never' is selected for 'Array Initializer', it is expected that any wrappings between the items are removed on formatting (like it's done for 'Extends/Implements List', for example).

Example:
// before formatting
$data = array(
    1,
    2);

// observed result after formatting
$data = array(
    1,
    2);

// expected result after formatting
$data = array(1, 2);

// or
$data = array(
    1, 2);

To additionally allow the current behavior, a new option 'Preserve Existing' should be added (as it's available for the 'Braces' category).

Sebastian