Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (7 years ago)
Author:
pento
Message:

Coding Standards: Upgrade WPCS to 1.0.0

WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:

  • Multiline function calls must now put each parameter on a new line.
  • Auto-formatting files is now part of the grunt precommit script.
  • Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r42876 r43571  
    11001100                    foreach ( $terms as $term ) {
    11011101                        $tax_query[] = array_merge(
    1102                             $tax_query_defaults, array(
     1102                            $tax_query_defaults,
     1103                            array(
    11031104                                'terms' => array( $term ),
    11041105                            )
     
    11071108                } else {
    11081109                    $tax_query[] = array_merge(
    1109                         $tax_query_defaults, array(
     1110                        $tax_query_defaults,
     1111                        array(
    11101112                            'terms' => preg_split( '/[,]+/', $term ),
    11111113                        )
     
    14291431         */
    14301432        $words = explode(
    1431             ',', _x(
     1433            ',',
     1434            _x(
    14321435                'about,an,are,as,at,be,by,com,for,from,how,in,is,it,of,on,or,that,the,this,to,was,what,when,where,who,will,with,www',
    14331436                'Comma-separated list of search stopwords in your language'
     
    17431746        if ( isset( $q['caller_get_posts'] ) ) {
    17441747            _deprecated_argument(
    1745                 'WP_Query', '3.1.0',
     1748                'WP_Query',
     1749                '3.1.0',
    17461750                /* translators: 1: caller_get_posts, 2: ignore_sticky_posts */
    17471751                sprintf(
     
    22022206                    array(
    22032207                        'compare' => '=',
    2204                     ), $q['comment_count']
     2208                    ),
     2209                    $q['comment_count']
    22052210                );
    22062211
Note: See TracChangeset for help on using the changeset viewer.