Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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-user.php

    r43330 r43571  
    240240        if ( ! $user = $wpdb->get_row(
    241241            $wpdb->prepare(
    242                 "SELECT * FROM $wpdb->users WHERE $db_field = %s", $value
     242                "SELECT * FROM $wpdb->users WHERE $db_field = %s",
     243                $value
    243244            )
    244245        ) ) {
     
    262263        if ( 'id' == $key ) {
    263264            _deprecated_argument(
    264                 'WP_User->id', '2.1.0',
     265                'WP_User->id',
     266                '2.1.0',
    265267                sprintf(
    266268                    /* translators: %s: WP_User->ID */
     
    294296        if ( 'id' == $key ) {
    295297            _deprecated_argument(
    296                 'WP_User->id', '2.1.0',
     298                'WP_User->id',
     299                '2.1.0',
    297300                sprintf(
    298301                    /* translators: %s: WP_User->ID */
     
    334337        if ( 'id' == $key ) {
    335338            _deprecated_argument(
    336                 'WP_User->id', '2.1.0',
     339                'WP_User->id',
     340                '2.1.0',
    337341                sprintf(
    338342                    /* translators: %s: WP_User->ID */
     
    358362        if ( 'id' == $key ) {
    359363            _deprecated_argument(
    360                 'WP_User->id', '2.1.0',
     364                'WP_User->id',
     365                '2.1.0',
    361366                sprintf(
    362367                    /* translators: %s: WP_User->ID */
Note: See TracChangeset for help on using the changeset viewer.