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 - Wrapping for array initializer 'Never' does not remove wrapping
Summary: Wrapping for array initializer 'Never' does not remove wrapping
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-25 08:16 UTC by SebastianZ
Modified: 2016-08-29 06:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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