ruleset.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0"?>
  2. <ruleset name="sabre.php">
  3. <description>sabre.io codesniffer ruleset</description>
  4. <!-- Include the whole PSR-1 standard -->
  5. <rule ref="PSR1" />
  6. <!-- All PHP files MUST use the Unix LF (linefeed) line ending. -->
  7. <rule ref="Generic.Files.LineEndings">
  8. <properties>
  9. <property name="eolChar" value="\n"/>
  10. </properties>
  11. </rule>
  12. <!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
  13. <rule ref="Zend.Files.ClosingTag"/>
  14. <!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
  15. <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
  16. <properties>
  17. <property name="ignoreBlankLines" value="true"/>
  18. </properties>
  19. </rule>
  20. <!-- There MUST NOT be more than one statement per line. -->
  21. <rule ref="Generic.Formatting.DisallowMultipleStatements"/>
  22. <rule ref="Generic.WhiteSpace.ScopeIndent">
  23. <properties>
  24. <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"/>
  25. </properties>
  26. </rule>
  27. <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
  28. <!-- PHP keywords MUST be in lower case. -->
  29. <rule ref="Generic.PHP.LowerCaseKeyword"/>
  30. <!-- The PHP constants true, false, and null MUST be in lower case. -->
  31. <rule ref="Generic.PHP.LowerCaseConstant"/>
  32. <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
  33. <!-- In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. -->
  34. <!--
  35. <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
  36. <properties>
  37. <property name="equalsSpacing" value="1"/>
  38. </properties>
  39. </rule>
  40. <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
  41. <severity>0</severity>
  42. </rule>
  43. -->
  44. <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
  45. </ruleset>