ruleset.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.Scope.MethodScope"/> -->
  33. <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
  34. <!-- In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. -->
  35. <!--
  36. <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
  37. <properties>
  38. <property name="equalsSpacing" value="1"/>
  39. </properties>
  40. </rule>
  41. <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
  42. <severity>0</severity>
  43. </rule>
  44. -->
  45. <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
  46. </ruleset>