<?xml version="1.0"?>
<ruleset>

    <config name="installed_paths" value="../../cakephp/cakephp-codesniffer,../../slevomat/coding-standard"/>

    <arg name="colors"/>
    <arg name="extensions" value="php"/>
    <arg value="ps"/>

    <file>Classes</file>
    <file>Tests</file>
    <file>ext_emconf.php</file>
    <file>ext_localconf.php</file>

    <rule ref="PSR2">
        <exclude name="Generic.Files.LineLength"/>
    </rule>

    <rule ref="Generic.PHP.NoSilencedErrors">
        <properties>
            <property name="error" type="bool" value="true"/>
        </properties>
    </rule>

    <rule ref="CakePHP.Commenting.DocBlockAlignment"/>
    <rule ref="CakePHP.Formatting.BlankLineBeforeReturn"/>
    <rule ref="CakePHP.Strings.ConcatenationSpacing"/>
    <rule ref="CakePHP.WhiteSpace.EmptyLines"/>

    <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
    <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
    <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
    <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
    <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
    <rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
    <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
    <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
        <properties>
            <property name="newlinesCountBetweenOpenTagAndDeclare" type="int" value="1"/>
        </properties>
        <exclude-pattern>ext_*.php</exclude-pattern>
    </rule>
    <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
    <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
    <rule ref="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces">
        <properties>
            <property name="linesCountAfterOpeningBrace" type="int" value="0"/>
            <property name="linesCountBeforeClosingBrace" type="int" value="0"/>
        </properties>
    </rule>

</ruleset>