If you write a line over 120 characters (or even over 80 characters), then I'm going to tell you to cut it out. If the style is wrong, the pull request won't be merged.Īlso, don't let anyone work for the company if their code stinks. While checking a pull request for obvious mistakes, also check the style. Even when it says MUST there's often wiggle room for example 'The soft limit on line length MUST be 120 characters.' It's a soft limit, not a hard one.įor us, it's just part of the normal peer review process for code. The PSR-1 and PSR-12 standards say SHOULD instead of MUST all over the place - and for good reason. I'm not a fan of automated tools - I think code style should be a guide with flexibility for edge cases where a different style will be easier to understand. phpcs.xml file for the extensions that I build looks like this (so far):
I work with M2 and use both the Magento Coding Standards and PSR-12.