shlink/phpcs.xml

58 lines
2.3 KiB
XML
Raw Normal View History

2016-04-10 02:38:07 -05:00
<?xml version="1.0"?>
<ruleset name="Coding standard">
<description>Coding standard</description>
2017-10-12 03:13:20 -05:00
<config name="installed_paths" value="../../slevomat/coding-standard"/>
2016-04-10 02:38:07 -05:00
<!-- display progress -->
<arg value="p"/>
<arg name="colors"/>
<!-- inherit rules from: -->
<rule ref="PSR2"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
2017-10-12 03:13:20 -05:00
<!-- Make sure string concatenations use 1 space between every element -->
<rule ref="Squiz.Strings.ConcatenationSpacing">
<properties>
<property name="spacing" value="1"/>
<property name="ignoreNewlines" value="true"/>
</properties>
</rule>
2016-04-10 02:38:07 -05:00
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="false"/>
</properties>
</rule>
2017-10-12 03:13:20 -05:00
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<!-- Force strict comparison with === or !== instead of == or != -->
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
<!-- Enforce all global namespace classes, functions and constants to be explicitly imported -->
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowFallbackGlobalFunctions" value="false"/>
<property name="allowFallbackGlobalConstants" value="false"/>
</properties>
</rule>
2016-04-10 02:38:07 -05:00
<!-- Paths to check -->
2016-08-17 04:47:08 -05:00
<file>bin</file>
2016-07-19 09:50:02 -05:00
<file>module</file>
<file>data/migrations</file>
2016-04-10 02:38:07 -05:00
<file>config</file>
<file>public/index.php</file>
<exclude-pattern>config/params/*</exclude-pattern>
2016-04-10 02:38:07 -05:00
</ruleset>