You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

phpcs.xml 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version="1.0"?>
  2. <ruleset name="PHP_CodeSniffer">
  3. <description>The coding standard for PHP_CodeSniffer itself.</description>
  4. <exclude-pattern>*/Tests/*</exclude-pattern>
  5. <exclude-pattern>*/lib/MDB2/*</exclude-pattern>
  6. <exclude-pattern>*/3rdparty/*</exclude-pattern>
  7. <exclude-pattern>*.min.*</exclude-pattern>
  8. <exclude-pattern>*/l10n/*</exclude-pattern>
  9. <exclude-pattern>*/files_texteditor/js/aceeditor/*</exclude-pattern>
  10. <exclude-pattern>*/files_pdfviewer/js/pdfjs/*</exclude-pattern>
  11. <exclude-pattern>*/files_odfviewer/src/*</exclude-pattern>
  12. <exclude-pattern>*/files_svgedit/svg-edit/*</exclude-pattern>
  13. <exclude-pattern>*jquery-ui-*.css</exclude-pattern>
  14. <extensions>php</extensions>
  15. <!-- Include the whole PEAR standard -->
  16. <rule ref="PEAR">
  17. <exclude name="PEAR.Commenting.FileComment.InvalidAuthors" />
  18. <exclude name="PEAR.Commenting.FileComment.TagIndent" />
  19. <exclude name="PEAR.Commenting.FileComment.MissingVersion" />
  20. <exclude name="PEAR.Commenting.FileComment.MissingTag" />
  21. <exclude name="PEAR.Commenting.ClassComment.TagIndent" />
  22. <!-- exclude name="PEAR.WhiteSpace.ScopeIndent.Incorrect" /-->
  23. <exclude name="PEAR.Commenting.ClassComment.WrongTagOrder" />
  24. <exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
  25. <exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket" />
  26. <exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
  27. <exclude name="Generic.ControlStructures.InlineControlStructure.Discouraged" />
  28. <exclude name="PEAR.Commenting.FunctionComment.ParameterCommentsNotAligned" />
  29. <exclude name="PEAR.Commenting.FunctionComment.MissingParamTag" />
  30. <exclude name="PEAR.ControlStructures.ControlSignature" />
  31. <!-- ident and alignment stuff -->
  32. <!-- exclude name="PEAR.ControlStructures.MultiLineCondition.Alignment" />
  33. <exclude name="PEAR.WhiteSpace.ScopeClosingBrace.BreakIdent" / -->
  34. <!-- allow curly on classes and functions -->
  35. <exclude name="PEAR.Functions.FunctionDeclaration.BraceOnSameLine" />
  36. <exclude name="PEAR.Classes.ClassDeclaration.OpenBraceNewLine" />
  37. <exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore" />
  38. <exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore" />
  39. <exclude name="PEAR.WhiteSpace.ScopeIndent"/>
  40. </rule>
  41. <rule ref="Zend.Files.ClosingTag" />
  42. <rule ref="Generic.WhiteSpace.ScopeIndent">
  43. <properties>
  44. <property name="indent" value="4"/>
  45. </properties>
  46. </rule>
  47. <rule ref="Generic.Files.LineLength">
  48. <properties>
  49. <property name="lineLimit" value="120"/>
  50. <property name="absoluteLineLimit" value="160"/>
  51. </properties>
  52. </rule>
  53. <!-- Include most of the Squiz standard -->
  54. <!-- rule ref="Squiz">
  55. <exclude name="Squiz.Classes.ClassFileName"/>
  56. <exclude name="Squiz.Classes.ValidClassName"/>
  57. <exclude name="Squiz.Commenting.ClassComment"/>
  58. <exclude name="Squiz.Commenting.FileComment"/>
  59. <exclude name="Squiz.Commenting.FunctionComment"/>
  60. <exclude name="Squiz.Commenting.VariableComment"/>
  61. <exclude name="Squiz.ControlStructures.SwitchDeclaration"/>
  62. <exclude name="Squiz.Files.FileExtension"/>
  63. <exclude name="Squiz.NamingConventions.ConstantCase"/>
  64. <exclude name="Squiz.Operators.ComparisonOperatorUsage"/>
  65. </rule -->
  66. <!-- We allow variables to be used inside double quoted strings -->
  67. <!-- rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
  68. <severity>0</severity>
  69. </rule -->
  70. </ruleset>