Constant arrays are not correctly formatted

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

Constant arrays are not correctly formatted

Postby DanTalash » September 21st, 2017, 3:53 pm

When constant arrays are used, the autoformatter will constantly try to remove indentation in the array.

For example, the following constant array:

Code: Select all
const CONSTANT_ARRAY = [
    1 => 1,
    2 => 2,
    3 => 3,
];



Will keep turning into this:

Code: Select all
const CONSTANT_ARRAY = [
1 => 1,
2 => 2,
3 => 3,
];


Which is rather annoying. Please fix it when you get a chance.

Regards,
DanTalash
 
Posts: 23
Joined: November 25th, 2015, 6:19 pm

Re: Constant arrays are not correctly formatted

Postby Miloslav Beno » September 25th, 2017, 1:26 pm

Hello Dan,

Thanks for letting us know, that's a bug. We will fix this one ASAP and release it in the next update. Construct like this should not be touched by the formatter and should be left as user wants them.

Thanks again!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 35 guests

cron

User Control Panel

Login

Who is online

In total there are 35 users online :: 0 registered, 0 hidden and 35 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 35 guests