Code Monkey home page Code Monkey logo

phpcs-composer's People

Contributors

samikeijonen avatar

Watchers

 avatar  avatar  avatar  avatar

phpcs-composer's Issues

Mismatched text domain

Mismatched text domain. Expected 'kala' but got 'meom-blocks'.
| | (WordPress.WP.I18n.TextDomainMismatch)

Above is outputted when using command ./vendor/bin/phpcs htdocs/wp-content/plugins/meomblocks with this .phpcs.xml.dist in meoblocks root.

<?xml version="1.0"?>
<ruleset name="Project Rules">
    <rule ref="MEOM-default" />

    <!-- Verify that the text_domain is set to the desired text-domain.
            Multiple valid text domains can be provided as a new element. -->
    <rule ref="WordPress.WP.I18n">
        <properties>
            <property name="text_domain" type="array">
                <element value="meom-blocks"/>
            </property>
        </properties>
    </rule>
</ruleset>

Maybe we need to remove checking kala text-domain check from this main PHPCS rules and it in theme or plugin root folder.

Allow short ternary operator ?:

Usual use case for short ternary is reading ACF field values and setting default if value is not set. Now it is not allowed.

$value = get_field('ploo') ? get_field('ploo') : 'moi;

could be written like

$value = get_field('ploo') ?: 'moi;

To allow short ternaries disable this: WordPress.PHP.DisallowShortTernary.Found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.