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 - Identation and tabulation with formatter
Summary: Identation and tabulation with formatter
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-18 14:23 UTC by mbenchekroun
Modified: 2016-06-10 09:46 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 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.