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/tests/phpunit/tests/user/countUsers.php

    r42343 r43571  
    6262                'subscriber'    => 1,
    6363                'none'          => 2,
    64             ), $count['avail_roles']
     64            ),
     65            $count['avail_roles']
    6566        );
    6667
     
    141142                'subscriber'    => 1,
    142143                'none'          => 2,
    143             ), $count['avail_roles']
     144            ),
     145            $count['avail_roles']
    144146        );
    145147
     
    155157                'editor'        => 1,
    156158                'none'          => 0,
    157             ), $count['avail_roles']
     159            ),
     160            $count['avail_roles']
    158161        );
    159162
     
    169172                'contributor'   => 1,
    170173                'none'          => 0,
    171             ), $count['avail_roles']
     174            ),
     175            $count['avail_roles']
    172176        );
    173177
     
    198202                'tester' => 1,
    199203                'none'   => 0,
    200             ), $count['avail_roles']
     204            ),
     205            $count['avail_roles']
    201206        );
    202207    }
     
    227232                'editor',
    228233                'author',
    229             ), get_userdata( $editor )->roles
     234            ),
     235            get_userdata( $editor )->roles
    230236        );
    231237
     
    240246                'author'        => 1,
    241247                'none'          => 0,
    242             ), $count['avail_roles']
     248            ),
     249            $count['avail_roles']
    243250        );
    244251
     
    264271        // Manually delete the user, but leave the capabilities usermeta.
    265272        $wpdb->delete(
    266             $wpdb->users, array(
     273            $wpdb->users,
     274            array(
    267275                'ID' => $u,
    268276            )
Note: See TracChangeset for help on using the changeset viewer.