You are browsing a version that has not yet been released.
As different people and projects have different tastes, sooner or later you may find some of them not compatible with your needs.
Fortunately that's not a problem and it's straightforward to customize the standard to fit your needs, either by reconfiguring the rules or by disabling/replacing them entirely.
Some rules have configurable properties to adjust their behavior (i.e. return type colon spacing), other are made for one specific purpose (i.e. require or forbid yoda conditions).
When a sniff is configurable, you can adjust its behavior by setting its properties:
1 <rule ref="Doctrine"/> <rule ref="Generic.Files.LineLength"> <properties> <!-- set soft line length limit to 120 characters --> <property name="lineLimit" value="120"/> <!-- set hard line length limit to 160 characters --> <property name="absoluteLineLimit" value="160"/> </properties> </rule> 2 3 4 5 6 7 8 9 10
It's possible to exclude a specific rule:
For better granularity, it's possible to also exclude only specific errors (if the sniff reports multiple errors):
It's also possible to exclude either a rule or an error for specific files/directories:
Adding new rules is simple, all you need to do is add a new