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 243008

Summary: Unnecessary continuation indentation
Product: php Reporter: Stawi
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Stawi 2014-03-18 14:36:24 UTC
When calling functions with array argument indentation goes crazy.

I use array indentation = 4 and continuation indentation = 20 (to see better).

It acts diffrent when assigning and just calling function (B2 and B3).
It acts diffrent inside function (A* tests) and directly in file (B* tests).
It also eats up empty lines after B3 and B4 tests.

I believe it is an old bug..

------- CODE -------

function some_function() {

    // A1. GOOD
    $array = array(
        'foo',
    );

    // A2. GOOD
    foobar(array(
        'foo',
    ));

    // A3. GOOD
    $foobar = foobar(array(
        'foo',
    ));

    // A4. GOOD
    $foobar = $test->foobar(array(
        'foo',
    ));

    // A5. FAIL
    $foobar = test::foobar(array(
                            'foo', // Unnecessary continuation indentation
    ));
}

// directly in file

// B1. GOOD
$array = array(
    'foo',
);

// B2. GOOD
foobar(array(
    'foo',
));

// B3. FAIL
$foobar = foobar(array(
    'foo',
                    )); // Unnecessary continuation indentation

// B4. FAIL
$foobar = $test->foobar(array(
    'foo',
                    )); // Unnecessary continuation indentation

// B5. FAIL
$foobar = test::foobar(array(
                        'foo', // Unnecessary continuation indentation
                    )); // Unnecessary continuation indentation
Comment 1 Stawi 2014-07-15 12:10:57 UTC
Any news?