<?xml version="1.0"?>
<ruleset name="Ecg">
    <description>ECG Coding Standard</description>

    <rule ref="Generic.Classes.DuplicateClassName"/>
    <rule ref="Generic.CodeAnalysis.EmptyStatement"/>
    <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
    <rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
    <rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
    <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
    <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
    <!--<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>-->
    <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
    <rule ref="Generic.Commenting.Fixme"/>
    <rule ref="Generic.Commenting.Todo"/>
    <rule ref="Generic.Files.ByteOrderMark"/>
    <rule ref="Generic.Files.OneClassPerFile"/>
    <rule ref="Generic.Files.OneInterfacePerFile"/>
    <rule ref="Generic.Functions.CallTimePassByReference"/>
    <rule ref="Generic.Metrics.CyclomaticComplexity"/>
    <rule ref="Generic.Metrics.NestingLevel"/>
    <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag">
        <exclude-pattern>*.phtml</exclude-pattern>
    </rule>
    <rule ref="Generic.PHP.DeprecatedFunctions"/>
    <rule ref="Generic.PHP.NoSilencedErrors"/>
    <rule ref="Generic.PHP.Syntax"/>

    <rule ref="Generic.WhiteSpace.ScopeIndent">
        <properties>
            <property name="ignoreIndentationTokens" type="array" value=""/>
        </properties>
    </rule>

    <rule ref="Squiz.Functions.GlobalFunction"/>
    <rule ref="Squiz.Operators.IncrementDecrementUsage"/>
    <rule ref="Squiz.PHP.DiscouragedFunctions"/>
    <rule ref="Squiz.PHP.Eval"/>
    <rule ref="Squiz.PHP.GlobalKeyword"/>
    <rule ref="Squiz.PHP.NonExecutableCode"/>
    <rule ref="Squiz.Scope.MethodScope"/>
    <rule ref="Squiz.Scope.MemberVarScope"/>

    <rule ref="Zend.Files.ClosingTag">
        <exclude-pattern>*.phtml</exclude-pattern>
    </rule>

    <rule ref="Ecg.Security.LanguageConstruct.DirectOutput">
        <exclude-pattern>*.phtml</exclude-pattern>
    </rule>
</ruleset>
