<?xml version="1.0"?>
<ruleset name="ResursbankTests">
    <config name="installed_paths" value="../../slevomat/coding-standard" />
    <rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation" />
    <rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement" />
    <rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace" />
    <rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing" />
    <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility" />
    <rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing" />
    <rule ref="SlevomatCodingStandard.Classes.ClassStructure">
        <properties>
            <property name="groups" type="array">
                <element value="uses" />
                <element value="enum cases" />
                <element value="public constants" />
                <element value="protected constants" />
                <element value="private constants" />
                <element value="public static properties" />
                <element value="public properties" />
                <element value="protected static properties" />
                <element value="protected properties" />
                <element value="private static properties" />
                <element value="private properties" />
                <element value="constructor, static constructors" />
                <element value="protected static methods, protected static final methods" />
                <element value="protected methods, protected final methods, protected abstract methods, protected static abstract methods" />
                <element value="private static methods" />
                <element value="private methods" />
                <element value="public static methods, public static final methods" />
                <element value="public methods, public final methods, public abstract methods, public static abstract methods" />
                <element value="destructor" />
                <element value="magic methods" />
            </property>
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Classes.ConstantSpacing" />
    <rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants" />
    <rule ref="SlevomatCodingStandard.Classes.DisallowMultiConstantDefinition" />
    <rule ref="SlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition" />
    <rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
        <properties>
            <property name="linesCountAfterOpeningBrace" value="0" />
            <property name="linesCountBeforeClosingBrace" value="0" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Classes.MethodSpacing">
        <properties>
            <property name="maxLinesCount" value="1" />
            <property name="minLinesCount" value="1" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference" />
    <rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration" />
    <rule ref="SlevomatCodingStandard.Classes.PropertySpacing">
        <properties>
            <property name="minLinesCountBeforeWithComment" value="1" />
            <property name="maxLinesCountBeforeWithComment" value="1" />
            <property name="minLinesCountBeforeWithoutComment" value="1" />
            <property name="maxLinesCountBeforeWithoutComment" value="1" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" />
    <rule ref="SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature" />
    <rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration" />
    <rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing">
        <properties>
            <property name="linesCountBeforeFirstUse" value="0" />
            <property name="linesCountAfterLastUse" value="1" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Classes.UselessLateStaticBinding" />
    <rule ref="SlevomatCodingStandard.Commenting.DeprecatedAnnotationDeclaration" />
    <rule ref="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode" />
    <rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
        <properties>
            <property name="linesCountBetweenDescriptionAndAnnotations" value="1" />
            <property name="linesCountBetweenDifferentAnnotationsTypes" value="0" />
            <property name="linesCountBetweenAnnotationsGroups" value="0" />
            <property name="linesCountAfterLastContent" value="0" />
            <property name="annotationsGroups" type="array">
                <element value="@param, @return, @throws, @see, @phpcsSuppress, @SuppressWarnings, @noinspection, @todo"/>
            </property>
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
        <properties>
            <property name="forbiddenAnnotations" type="array">
                <element value="@author" />
                <element value="@created" />
                <element value="@version" />
                <element value="@package" />
                <element value="@copyright" />
                <element value="@license" />
                <element value="@since" /> <!-- @todo This can be removed after we complete initial development. -->
            </property>
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
    <rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration" />
    <rule ref="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment" />
    <rule ref="SlevomatCodingStandard.Complexity.Cognitive" />
    <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition" />
    <rule ref="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing">
        <properties>
            <property name="linesCountBefore" value="1" />
            <property name="linesCountAfter" value="1" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit" />
    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch" />
    <rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses" />
    <rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses" />
    <rule ref="SlevomatCodingStandard.ControlStructures.RequireMultiLineCondition">
        <properties>
            <property name="minLineLength" value="81" />
            <property name="booleanOperatorOnPreviousLine" value="true" />
            <property name="alwaysSplitAllConditionParts" value="true" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator">
        <properties>
            <property name="lineLengthLimit" value="80" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator" />
    <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" />
    <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator" />
    <rule ref="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator" />
    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison" />
    <rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn" />
    <rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator" />
    <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch" />
    <rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly" />
    <rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch" />
    <rule ref="SlevomatCodingStandard.Files.LineLength">
        <properties>
            <property name="lineLengthLimit" value="120" />
            <property name="ignoreComments" value="false" />
            <property name="ignoreImports" value="true" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
        <properties>
            <property name="rootNamespaces" type="array">
                <element key="tests" value="Resursbank\EcomTest" />
            </property>
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration">
        <properties>
            <property name="spacesCountAfterKeyword" value="1" />
            <property name="spacesCountBeforeArrow" value="1" />
            <property name="spacesCountAfterArrow" value="1" />
            <property name="allowMultiLine" value="false" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction" />
    <rule ref="SlevomatCodingStandard.Functions.RequireArrowFunction" />
    <rule ref="SlevomatCodingStandard.Functions.RequireMultiLineCall">
        <properties>
            <property name="minLineLength" value="81" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Functions.RequireSingleLineCall">
        <properties>
            <property name="maxLineLength" value="80" />
            <property name="ignoreWithComplexParameter" value="true" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall" />
    <rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse" />
    <rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration" />
    <rule ref="SlevomatCodingStandard.Functions.StaticClosure" />
    <rule ref="SlevomatCodingStandard.Functions.StrictCall" />
    <rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure" />
    <rule ref="SlevomatCodingStandard.Functions.UnusedParameter" />
    <rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue" />
    <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
    <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
    <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse" />
    <rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine" />
    <rule ref="SlevomatCodingStandard.Namespaces.NamespaceDeclaration" />
    <rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile" />
    <rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly" />
    <rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace" />
    <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" />
    <rule ref="SlevomatCodingStandard.Namespaces.UseSpacing">
        <properties>
            <property name="linesCountBeforeFirstUse" value="1" />
            <property name="linesCountBetweenUseTypes" value="1" />
            <property name="linesCountAfterLastUse" value="1" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Namespaces.UselessAlias" />
    <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
        <properties>
            <property name="searchAnnotations" value="true" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator" />
    <rule ref="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator" />
    <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators" />
    <rule ref="SlevomatCodingStandard.Operators.NegationOperatorSpacing">
        <properties>
            <property name="spacesCount" value="0" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator" />
    <rule ref="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall" />
    <rule ref="SlevomatCodingStandard.PHP.ReferenceSpacing">
        <properties>
            <property name="spacesCountAfterReference" value="0" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.PHP.TypeCast" />
    <rule ref="SlevomatCodingStandard.PHP.UselessParentheses">
        <properties>
            <property name="ignoreComplexTernaryConditions" value="true" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.PHP.UselessSemicolon" />
    <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
        <properties>
            <property name="linesCountBeforeDeclare" value="1" />
            <property name="linesCountAfterDeclare" value="1" />
            <property name="spacesCountAroundEqualsSign" value="0" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax" />
    <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints" />
    <rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition" />
    <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" />
    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing" />
    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
        <exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification" />
    </rule>
    <rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
        <exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
    </rule>
    <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
        <exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
    </rule>
    <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
        <properties>
            <property name="spacesCountBeforeColon" value="0" />
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint" />
    <rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" />
    <rule ref="SlevomatCodingStandard.Variables.UnusedVariable" />
    <rule ref="SlevomatCodingStandard.Variables.UselessVariable" />
    <rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces" />
</ruleset>
