简体   繁体   中英

How to have Zend Studio format PHP code like NetBeans 7.1 does?

I work with NetBeans 7.1, I like how NetBeans formats the PHP code.

I'm working on this project with other developer, but he uses Zend Studio (ZS), and when he reformats the code with ZS, and commit the changes to git, it appears like he has changed the whole file, when in fact it was just change a few lines. This beats the whole purpose of having the version control, if every little change in the code will look like the whole file was changed.

He likes Zend Studio, I don't want to impose him using other product. I won't mind use ZS, but can't pay the $300 price tag, when I have what I need with NetBeans for free.

So I'm looking for a way to have him continue using his IDE, but when he formats his code, ZS does it the same same way as NetBeans does.

Any suggestions on what to change on Zend Studio to have the code formatting like NetBeans 7.1 does?

Thanks!

Try installing the PHPCS plugin in NetBeans and select the ZEND framework ruleset for setting up the coding standards, this will auto format the code in NetBeans as it is done in ZS. You may google or also take a look at some of these articles:

In short, you both need to decide and follow some coding standards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM