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 249428

Summary: Identation and tabulation with formatter
Product: php Reporter: mbenchekroun
Component: Formatting & IndentationAssignee: Tomas Mysik <tmysik>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description mbenchekroun 2014-12-18 14:23:45 UTC
Hello there,

first I would like to say I really admire the effort you're putting into netbeans, and thank you for all.

I've a little issue with my auto-indentation when I use annonymous functions it goes wild.

$array = array('e'=>$a,'formatter'=>function($element){

                      });

Every decralation as the one before, will add an extra indentation to all the following code.
If I have 10 of those, at the end of the file, all my code is pushed to the right with 10 indentation and it's really hard to work in such conditions.

Thank you for all.
Comment 1 ryannaddy 2015-08-15 02:33:48 UTC
When I format the array it looks fine on mine:

$array = array(
    'e' => $a,
    'formatter' => function($element){

    }
);

However, when an array is placed inside of the anonymous function then it gets all screwy.
Comment 2 Tomas Mysik 2016-06-10 09:46:52 UTC
Could you please try the current dev build? It seems to me that it could be a bit better. If I am wrong, please reopen this issue and provide a sample file.

Thank you.