Static array variables are not correctly formatted.

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Static array variables are not correctly formatted.

Postby DanTalash » January 31st, 2018, 4:53 pm

When a static variable inside a function is an array, the autoformatter keeps trying to eat the indentation.


The following static array will keep changing.
Code: Select all
function someFunc() {
    static $arr = [
        1,
        2,
        3
    ];
}


Formatted version. Note that the indentation is missing.
Code: Select all
function someFunc() {
    static $arr = [
    1,
    2,
    3
    ];
}
DanTalash
 
Posts: 23
Joined: November 25th, 2015, 6:19 pm

Re: Static array variables are not correctly formatted.

Postby Miloslav Beno » February 13th, 2018, 2:24 pm

Hi Dan,

Thanks for posting this bug.

We've fixed this and it will be available in the next update.

Thank you,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1242
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 2 guests

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 2 guests
Phalanger