phpcs.xml.dist 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0"?>
  2. <ruleset>
  3. <arg name="basepath" value="."/>
  4. <arg name="extensions" value="php"/>
  5. <arg name="parallel" value="80"/>
  6. <arg name="cache" value=".phpcs-cache"/>
  7. <arg name="colors" />
  8. <!-- Ignore warnings and show progress of the run -->
  9. <arg value="np"/>
  10. <file>lib</file>
  11. <file>tests</file>
  12. <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
  13. <exclude-pattern>*/tests/*</exclude-pattern>
  14. </rule>
  15. <!-- Import PSR-2 coding standard (base) -->
  16. <rule ref="PSR2">
  17. <!-- Using \Doctrine\Sniffs\Spacing\ControlStructureSniff instead -->
  18. <exclude name="PSR2.ControlStructures.ControlStructureSpacing"/>
  19. </rule>
  20. <!-- Import PSR-2 coding standard (base) -->
  21. <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
  22. <exclude-pattern>*/lib/Mongo/*</exclude-pattern>
  23. </rule>
  24. <!-- Disallow else if in favour elseif -->
  25. <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed">
  26. <type>error</type>
  27. </rule>
  28. <!-- Force whitespace after a type cast -->
  29. <rule ref="Generic.Formatting.SpaceAfterCast" />
  30. <!-- Force whitespace before and after concatenation -->
  31. <rule ref="Squiz.Strings.ConcatenationSpacing">
  32. <properties>
  33. <property name="spacing" value="1"/>
  34. <property name="ignoreNewlines" value="true"/>
  35. </properties>
  36. </rule>
  37. </ruleset>