<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PSR12" xsi:noNamespaceSchemaLocation="../../../phpcs.xsd">
    <description>The PSR-12 coding standard.</description>
    <arg name="tab-width" value="4"/>
    <rule ref="PSR1"/>
    <rule ref="Generic.Files.LineEndings">
        <properties>
            <property name="eolChar" value="\n"/>
        </properties>
    </rule>
    <rule ref="PSR2.Files.EndFileNewline"/>
    <rule ref="PSR2.Files.ClosingTag"/>
    <rule ref="Generic.Files.LineLength">
        <properties>
            <property name="lineLimit" value="1024"/>
            <property name="absoluteLineLimit" value="0"/>
        </properties>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
        <properties>
            <property name="ignoreBlankLines" value="true"/>
        </properties>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
        <severity>0</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
        <severity>0</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
        <severity>0</severity>
    </rule>
    <rule ref="Generic.Formatting.DisallowMultipleStatements"/>
    <rule ref="Generic.WhiteSpace.ScopeIndent">
        <properties>
            <property name="ignoreIndentationTokens" type="array">
                <element value="T_COMMENT"/>
                <element value="T_DOC_COMMENT_OPEN_TAG"/>
            </property>
        </properties>
    </rule>
    <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
    <rule ref="Generic.PHP.LowerCaseKeyword"/>
    <rule ref="Generic.PHP.LowerCaseConstant"/>
    <rule ref="Generic.PHP.LowerCaseType"/>
    <rule ref="PSR12.Keywords.ShortFormTypeKeywords"/>
    <rule ref="PSR12.Files.FileHeader"/>
    <rule ref="PSR12.Files.ImportStatement"/>
    <rule ref="PSR12.Namespaces.CompoundNamespaceDepth"/>
    <rule ref="PSR12.Files.DeclareStatement"/>
    <rule ref="PSR12.Classes.ClosingBrace"/>
    <rule ref="PSR12.Classes.ClassInstantiation"/>
    <rule ref="PSR2.Classes.ClassDeclaration"/>
    <rule ref="PSR12.Traits.UseDeclaration"/>
    <rule ref="PSR2.Classes.PropertyDeclaration"/>
    <rule ref="PSR12.Properties.ConstantVisibility"/>
    <rule ref="Squiz.Scope.MethodScope"/>
    <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
    <rule ref="PSR2.Methods.MethodDeclaration"/>
    <rule ref="PSR2.Methods.MethodDeclaration.Underscore">
        <type>error</type>
        <message>Method name "%s" must not be prefixed with an underscore to indicate visibility</message>
    </rule>
    <rule ref="PSR2.Methods.FunctionClosingBrace"/>
    <rule ref="Squiz.Functions.FunctionDeclaration"/>
    <rule ref="Squiz.Functions.LowercaseFunctionKeywords"/>
    <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
        <properties>
            <property name="equalsSpacing" value="1"/>
        </properties>
    </rule>
    <rule ref="PEAR.Functions.ValidDefaultValue"/>
    <rule ref="Squiz.Functions.MultiLineFunctionDeclaration"/>
    <rule ref="PSR12.Functions.ReturnTypeDeclaration"/>
    <rule ref="PSR12.Functions.NullableTypeDeclaration"/>
    <rule ref="PSR2.Methods.MethodDeclaration"/>
    <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
    <rule ref="PSR2.Methods.FunctionCallSignature"/>
    <rule ref="PSR2.Methods.FunctionCallSignature.SpaceAfterCloseBracket">
        <severity>0</severity>
    </rule>
    <rule ref="PSR2.Methods.FunctionCallSignature.OpeningIndent">
        <severity>0</severity>
    </rule>
    <rule ref="Squiz.ControlStructures.ControlSignature"/>
    <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/>
    <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
    <rule ref="Squiz.WhiteSpace.ScopeClosingBrace"/>
    <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/>
    <rule ref="Squiz.ControlStructures.ForLoopDeclaration">
        <properties>
            <property name="ignoreNewlines" value="true"/>
        </properties>
    </rule>
    <rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen">
        <severity>0</severity>
    </rule>
    <rule ref="Squiz.ControlStructures.ForLoopDeclaration.SpacingBeforeClose">
        <severity>0</severity>
    </rule>
    <rule ref="Squiz.ControlStructures.LowercaseDeclaration"/>
    <rule ref="Generic.ControlStructures.InlineControlStructure"/>
    <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.AsNotLower">
        <severity>0</severity>
    </rule>
    <rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
    <rule ref="PSR12.ControlStructures.ControlStructureSpacing"/>
    <rule ref="PSR12.ControlStructures.BooleanOperatorPlacement"/>
    <rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
    <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen">
        <severity>0</severity>
    </rule>
    <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose">
        <severity>0</severity>
    </rule>
    <rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/>
    <rule ref="Squiz.WhiteSpace.CastSpacing"/>
    <rule ref="PSR12.Operators.OperatorSpacing"/>
    <rule ref="PSR12.Operators.OperatorSpacing"/>
    <rule ref="PSR12.Functions.ReturnTypeDeclaration"/>
    <rule ref="PSR12.Classes.AnonClassDeclaration"/>
</ruleset>
