awesomemotive / wpforms-phpcs

PHP Coding Standards used by the WPForms team.
https://wpforms.com
GNU General Public License v2.0
11 stars 1 forks source link

Domain check for i18n function work isn't correctly for multi domain project #24

Closed wppunk closed 1 year ago

wppunk commented 1 year ago

Description

I added a directory separator at the end of domains & file dir.

Motivation and Context

Fixes #23.

Testing procedure

  1. Set up config:
    <config name="multi_domains" value="true"/>
    <rule ref="WPForms.PHP.ValidateDomain">
    <properties>
        <property name="wpforms-lite" value="wpforms"/>
        <property name="wpforms" value="wpforms/pro/,wpforms/src/Pro/"/>
    </properties>
    </rule>
  2. Create a file wpforms-some-addon-name/some-directory/some-file.php
  3. Add in the file a few i18n functions
  4. Run the code sniffer