S
S
ssxx2014-04-06 17:26:55
PHP
ssxx, 2014-04-06 17:26:55

Auto format padding in associative arrays in PHPStorm

I can't find this feature at all.
Now like this:

return json_encode(array(
                    'messages' => array(
                        'username' => $validator->messages()->first('username'),
                        'email' => $validator->messages()->first('email'),
                        'password' => $validator->messages()->first('password'),
                    )
                ));

I want so:
return json_encode(array(
                    'messages' => array(
                        'username' => $validator->messages()->first('username'),
                        'email'    => $validator->messages()->first('email'),
                        'password' => $validator->messages()->first('password'),
                    )
                ));

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tyranron, 2014-04-06
@ssxx

PHPStorm 7
Preferences (or Settings) > Project Settings section > Code Style item > PHP sub item > Other tab > Align key-value pairs checkbox

D
DDanya, 2014-04-06
@DDanya

Maybe we should climb into "Settings->Code Style->PHP" ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question