<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WordPress Coding Standards" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">

  <description>The Coding standard for the WordPress Coding Standards itself.</description>

  <file>.</file>

  <arg value="sp"/>
  <arg name="extensions" value="php"/>

  <exclude-pattern>/bin/class-ruleset-test.php</exclude-pattern>
  <!-- Exclude Composer vendor directory. -->
  <exclude-pattern>*/vendor/*</exclude-pattern>

  <rule ref="WordPress-Extra">
    <exclude name="WordPress.Files.FileName"/>
  </rule>

  <!-- <rule ref="WordPress-Docs"/> -->

  <!-- Enforce PSR1 compatible namespaces. -->
  <rule ref="PSR1.Classes.ClassDeclaration"/>

  <rule ref="WordPress.Arrays.MultipleStatementAlignment">
    <properties>
      <property name="alignMultilineItems" value="!=100"/>
      <property name="exact" value="false" phpcs-only="true"/>
    </properties>
  </rule>

  <rule ref="PSR2.Methods.FunctionClosingBrace"/>

  <rule ref="WordPress.NamingConventions.PrefixAllGlobals.DeprecatedWhitelistCommentFound">
    <!-- False positive for whitelist comment recognition, but no use fixing this now
       as the WPCS native whitelist comments are deprecated anyhow. -->
    <exclude-pattern>/WordPress/AbstractClassRestrictionsSniff\.php$</exclude-pattern>
  </rule>
</ruleset>