Netbeans 7.4 PHP缩进规则

时间:2013-12-16 15:02:35

标签: php netbeans indentation

我对netbeans 7.4中PHP代码的正确自动缩进(ALT + SHIFT + F)有问题:

$this->templates = array(           
         self::TEMPLATE_COMMENT => new Template(
                    self::TEMPLATE_COMMENT, "foo" . Template::TEMPLATE_PLACEHOLDER_OBJECT_NAME . "bar", array(
                "bing" => array(':' . Template::TEMPLATE_PLACEHOLDER_OBJECT_ID . ':', 'lalala'),
                    ), Template::TEMPLATE_PLACEHOLDER_USER_IMAGE
        )
);

如你所见,该行以“bing”开头,有错误的缩进。这是一个错误还是我怎么能阻止这个?

首选结果应该是这样的:

$this->templates = array(           
         self::TEMPLATE_COMMENT => new Template(
                    self::TEMPLATE_COMMENT, "foo" . Template::TEMPLATE_PLACEHOLDER_OBJECT_NAME . "bar", array(
                            "bing" => array(':' . Template::TEMPLATE_PLACEHOLDER_OBJECT_ID . ':', 'lalala'),
                    ), Template::TEMPLATE_PLACEHOLDER_USER_IMAGE
        )
);

0 个答案:

没有答案