We recently migrated to git and implemented (at the moment post) reception on a central server to send reports to developers, as well as create several tools that allow us to automatically control our codon drive using phpcs in our development environments.
This is all good and dandy, it works well, but we want to be able to always depend on our code standard without ignoring every file that does not correspond to a logical reason. Now we have our own set of rules that overrides some things in the PEAR standard by default, but we want to go a little further if possible.
Our problem is that although the PEAR standard is ideal for all classes / business logic, we want to loosen the rules in view files, say, closing brackets, which should be on a separate line. The problem is that we basically define html in these files, and the only control structures we have are simple if-else or foreach statements, as well as opening php and then adding a new line, closing the brackets, a new line and closing php is a bit silly imo.
The required syntax must be valid:
<?php }
What we would like to use for views:
<?php }
This will make our code more readable ...
We do not like alternative syntax like wel ( if(..): ... endif; ), afyk mainly because there are some problems in reality (all this is about spaces ...).
Ignoring the whole file (using // @codingStandardsIgnoreFile ) is not an option for us.
TL; DR
So what we would like to do is to define a separate set of rules for our view files so that we still adhere to the standard, but with laid-back rules on these fronts so that our code can still be readable.
I am still not too keen on phpcs, and could not find any solutions myself using the keywords, although I was logical ... Any suggestions for creating files in order that also match PEAR are also welcome ...