<?xml version="1.0"?>
<ruleset name="AdBrains Events Calendar & RSVP">
    <description>WordPress Coding Standards configuration for AdBrains Events Calendar & RSVP plugin.</description>

    <!-- Scan these directories -->
    <file>adbrains-events-calendar.php</file>
    <file>src/</file>
    <file>public/</file>

    <!-- Exclude vendor and generated files -->
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>*/node_modules/*</exclude-pattern>
    <exclude-pattern>*/assets/vendor/*</exclude-pattern>

    <!-- Use WordPress Coding Standards -->
    <rule ref="WordPress">
        <!-- Allow short array syntax [] -->
        <exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
    </rule>

    <!-- Declare the plugin prefixes so PrefixAllGlobals recognizes adbrains_events_calendar_rsvp_ and AdbrainsEventManager -->
    <rule ref="WordPress.NamingConventions.PrefixAllGlobals">
        <properties>
            <property name="prefixes" type="array">
                <element value="adbrains_events_calendar_rsvp"/>
                <element value="AdbrainsEventManager"/>
                <element value="events_calendar_rsvp"/>
            </property>
        </properties>
    </rule>

    <!-- Configure the expected text domain for the plugin -->
    <rule ref="WordPress.WP.I18n">
        <properties>
            <property name="text_domain" type="array">
                <element value="adbrains-events-calendar-rsvp"/>
            </property>
        </properties>
    </rule>

    <!-- Minimum WordPress version -->
    <config name="minimum_supported_wp_version" value="6.0"/>

    <!-- PHP minimum version -->
    <config name="testVersion" value="7.4-"/>
</ruleset>
