phpcs.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ruleset name="RSS-Bridge Ruleset">
  3. <description>Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/</description>
  4. <exclude-pattern>./css</exclude-pattern>
  5. <exclude-pattern>./vendor</exclude-pattern>
  6. <!-- Duplicate class names are not allowed -->
  7. <rule ref="Generic.Classes.DuplicateClassName"/>
  8. <!-- Statements must not be empty -->
  9. <rule ref="Generic.CodeAnalysis.EmptyStatement"/>
  10. <!-- Unconditional if-statements are not allowed -->
  11. <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
  12. <!-- Do not use final statements inside final classes -->
  13. <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
  14. <!-- Do not override methods to call their parent -->
  15. <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
  16. <!-- One line should not have more than 80 characters -->
  17. <!-- One line must never exceed 120 characters -->
  18. <rule ref="Generic.Files.LineLength">
  19. <properties>
  20. <property name="lineLimit" value="80"/>
  21. <property name="absoluteLineLimit" value="120"/>
  22. </properties>
  23. </rule>
  24. <!-- When calling a function: -->
  25. <!-- Do not add a space before the opening parenthesis -->
  26. <!-- Do not add a space after the opening parenthesis -->
  27. <!-- Do not add a space before the closing parenthesis -->
  28. <!-- Do not add a space before a comma -->
  29. <!-- Add a space after a comma -->
  30. <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
  31. <!-- Use UPPERCARE for constants -->
  32. <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
  33. <!-- Use lowercase for 'true', 'false' and 'null' -->
  34. <rule ref="Generic.PHP.LowerCaseConstant"/>
  35. <!-- Use a single string instead of concating -->
  36. <rule ref="Generic.Strings.UnnecessaryStringConcat"/>
  37. <!-- Use tabs for indentation -->
  38. <rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
  39. <!-- Parameters with default values must appear last in functions -->
  40. <rule ref="PEAR.Functions.ValidDefaultValue"/>
  41. <!-- Use PascalCase for class names -->
  42. <rule ref="PEAR.NamingConventions.ValidClassName"/>
  43. <!-- Use 'elseif' instead of 'else if' -->
  44. <rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
  45. <!-- Add a new line at the end of a file -->
  46. <rule ref="PSR2.Files.EndFileNewline"/>
  47. <!-- When declaring a function: -->
  48. <!-- Do not add a space before a comma -->
  49. <!-- Add a space after a comma -->
  50. <!-- Add a space before and after an equal sign -->
  51. <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
  52. <properties>
  53. <property name="equalsSpacing" value="1"/>
  54. </properties>
  55. </rule>
  56. <!-- Do not add spaces when casting -->
  57. <rule ref="Squiz.WhiteSpace.CastSpacing"/>
  58. <!-- Operators must have a space around them -->
  59. <rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
  60. <!-- Do not add a whitespace before a semicolon -->
  61. <rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
  62. <!-- Do not add whitespace at start or end of a file or end of a line -->
  63. <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
  64. </ruleset>