I recently led a discussion at the Austin Magento Meetup group on Magento Development Best Practices, so I figured I would start a small series of posts about it. To start it off, I’d like to start with team coding style unity.
Unless you are the sole developer on a project, this is an important topic. I find it incredibly annoying to open up a file that is formatted completely differently than I do it. I know it is easy with an IDE to reformat it, but having to do it over and over again (thus causing your teammates who have different styles than you to have to reformat it back) is very annoying.
I highly suggest getting the entire team onboard and adopting a specific standard. Since Magento is built with PHP, my suggestion is to adopt and follow the Zend Code Style Standards. It is already all documented and well thought out, so you wouldn’t have to create your own document for it all and keep it maintained. To make it even more enticing, Magento follows these standards for the most part anyway.
Getting your team united in code style will not only make the team development experience more enjoyable, it will also promote the creation of good quality code (as long as you are using a good standard!).