<?xml version="1.0"?>
<ruleset name="join-block">
    <description>Coding standard for the join-block plugin.</description>

    <file>.</file>
    <exclude-pattern>vendor/*</exclude-pattern>
    <exclude-pattern>tests/*</exclude-pattern>
    <exclude-pattern>wordpress/*</exclude-pattern>
    <arg name="extensions" value="php"/>

    <!-- Warnings (e.g. long lines) are advisory and do not fail the build.
         Errors still do. -->
    <config name="ignore_warnings_on_exit" value="1"/>

    <rule ref="PSR12">
        <!-- The ABSPATH guard at the top of each file is idiomatic WordPress
             and unavoidably mixes a side effect with symbol declarations. -->
        <exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
    </rule>

    <!-- CK_Theme_Options_Container extends Carbon Fields' snake_case API:
         to_json() overrides the parent method, so PSR12 naming cannot apply. -->
    <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
        <exclude-pattern>src/CK_Theme_Options_Container.php</exclude-pattern>
    </rule>
    <rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
        <exclude-pattern>src/CK_Theme_Options_Container.php</exclude-pattern>
    </rule>
</ruleset>
