|
|
@@ -0,0 +1,45 @@
|
|
|
+<?xml version="1.0"?>
|
|
|
+<ruleset>
|
|
|
+ <arg name="basepath" value="."/>
|
|
|
+ <arg name="extensions" value="php"/>
|
|
|
+ <arg name="parallel" value="80"/>
|
|
|
+ <arg name="cache" value=".phpcs-cache"/>
|
|
|
+ <arg name="colors" />
|
|
|
+
|
|
|
+ <!-- Ignore warnings and show progress of the run -->
|
|
|
+ <arg value="np"/>
|
|
|
+
|
|
|
+ <file>lib</file>
|
|
|
+ <file>tests</file>
|
|
|
+
|
|
|
+ <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
|
|
|
+ <exclude-pattern>*/tests/*</exclude-pattern>
|
|
|
+ </rule>
|
|
|
+
|
|
|
+ <!-- Import PSR-2 coding standard (base) -->
|
|
|
+ <rule ref="PSR2">
|
|
|
+ <!-- Using \Doctrine\Sniffs\Spacing\ControlStructureSniff instead -->
|
|
|
+ <exclude name="PSR2.ControlStructures.ControlStructureSpacing"/>
|
|
|
+ </rule>
|
|
|
+
|
|
|
+ <!-- Import PSR-2 coding standard (base) -->
|
|
|
+ <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
|
|
|
+ <exclude-pattern>*/lib/Mongo/*</exclude-pattern>
|
|
|
+ </rule>
|
|
|
+
|
|
|
+ <!-- Disallow else if in favour elseif -->
|
|
|
+ <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed">
|
|
|
+ <type>error</type>
|
|
|
+ </rule>
|
|
|
+
|
|
|
+ <!-- Force whitespace after a type cast -->
|
|
|
+ <rule ref="Generic.Formatting.SpaceAfterCast" />
|
|
|
+
|
|
|
+ <!-- Force whitespace before and after concatenation -->
|
|
|
+ <rule ref="Squiz.Strings.ConcatenationSpacing">
|
|
|
+ <properties>
|
|
|
+ <property name="spacing" value="1"/>
|
|
|
+ <property name="ignoreNewlines" value="true"/>
|
|
|
+ </properties>
|
|
|
+ </rule>
|
|
|
+</ruleset>
|