Nam G VU
Nam G VU

Reputation: 35364

What is `assignment`formatting for `PHP alignment` in Netbeans PHP option?

As I guess, this is about the code formation for multi-line assignment such as this post has fully described.

...example
$server = 'localhost';
$port = 80;

the equal signs would be made to "line up", the second statement getting more whitespace padding in front of the equal sign than it would...

i.e. we want it to be

$server = 'localhost';    
$port   = 80;

But I guess it is not that way.

So my question is what is such option?

enter image description here

Upvotes: 3

Views: 1953

Answers (1)

Jonathan Spooner
Jonathan Spooner

Reputation: 7752

Update: As of 20th of July 2018 this feature is working as expected. Once you save the settings as shown in question, you can use the 'auto format' feature ( Alt + Shift + F ) to align the code based on assignment operator.


You are correct in thinking that this option is for aligning multi-line assignments. However, it appears that this is an issue which has not yet been fixed.

I have voted for it and it would be advisable that you do the same. To vote on an issue, you'll need to register for an account and sign in. Once signed in, visit the issue and click on the vote link which is next to the priority section.

Upvotes: 2

Related Questions