<?xml version="1.0"?>
<ruleset name="YooKassa PHPMD Ruleset"
         xmlns="https://pmd.sf.net/ruleset/1.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sf.net/ruleset_xml_schema.xsd"
         xsi:noNamespaceSchemaLocation=" https://pmd.sf.net/ruleset_xml_schema.xsd">
    <description>
        Ruleset for PHPMD analysis of Drupal projects. Excludes coding issues
        handled better by PHPCS and rules which have too many false positives
        in a typical YooKassa codebase.
    </description>
    <rule ref="rulesets/cleancode.xml">
        <exclude name="StaticAccess"/>
    </rule>
    <rule ref="rulesets/codesize.xml"/>
    <rule ref="rulesets/controversial.xml">
        <exclude name="CamelCasePropertyName"/>
    </rule>
    <rule ref="rulesets/design.xml"/>
    <rule ref="rulesets/unusedcode.xml"/>
    <rule ref="rulesets/naming.xml">
        <exclude name="ShortVariable"/>
    </rule>
    <rule ref="rulesets/naming.xml/ShortVariable"
          since="0.2"
          message="Avoid variables with short names like {0}. Configured minimum length is {1}."
          class="PHPMD\Rule\Naming\ShortVariable"
          externalInfoUrl="https://phpmd.org/rules/naming.html#shortvariable">
        <priority>3</priority>
        <properties>
            <property name="minimum" description="Minimum length for a variable, property or parameter name" value="3"/>
            <property name="exceptions" value="id" />
        </properties>
    </rule>
</ruleset>
