<?xml version="1.0"?>
<ruleset name="SimpleSAMLphp SAML2 ruleset">
    <description>
        By default it is less stringent about long lines than other coding standards
    </description>

    <!-- Use this to exclude paths. You can have multiple patterns -->
    <!--<exclude-pattern>*/tests/*</exclude-pattern>-->
    <!--<exclude-pattern>*/other/*</exclude-pattern>-->

    <!-- This is the rule we inherit from. If you want to exlude some specific rules, see the docs on how to do that -->
    <rule ref="PSR2"/>

    <rule ref="Generic.PHP.LowerCaseConstant">
        <exclude name="Generic.PHP.LowerCaseConstant" />
    </rule>

    <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
        <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
    </rule>
    <rule ref="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody">
        <exclude name="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody" />
    </rule>
    <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
        <exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
    </rule>

    <rule ref="Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase">
        <exclude-pattern>**/Assertion.php</exclude-pattern>
        <exclude-pattern>**/LogoutRequest.php</exclude-pattern>
        <exclude-pattern>**/EncryptedAssertion.php</exclude-pattern>
    </rule>

    <rule ref="Generic.PHP.UpperCaseConstant"/>

    <!-- Lines can be a little bit longer before they break the build -->
    <rule ref="Generic.Files.LineLength">
        <properties>
            <property name="lineLimit" value="150"/>
            <property name="absoluteLineLimit" value="150"/>
        </properties>
        <exclude-pattern>**/EntityDescriptor.php</exclude-pattern>
    </rule>
</ruleset>
