Proper indentation in array initialization, PDT/Zend Studio

Posted by Sergei Stolyarov on Stack Overflow See other posts from Stack Overflow or by Sergei Stolyarov
Published on 2009-08-27T05:07:27Z Indexed on 2010/04/26 0:53 UTC
Read the original article Hit count: 484

Filed under:
|
|

I'm using the following style of array initialization in the code:

$a = array(
    'one' => 123,
    'two' => 456
);

But PDT/Zend Studio doesn't work properly in this case; after pressing [Return] key it places cursor under the $a (in my example) and ignores indentation. If array keys are numbers (at least not start with quotation marks) everything is working fine.

This is how it works currently (| — is a position where edtitor places caret after pressing [Return])

$a = array(
    'one' => 123,[RETURN]
|
);

This is expected result:

$a = array(
    'one' => 123,[RETURN]
    |
);

So is it possible to force editor follow my indentation rules?

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-studio