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/mapMetaCap.php

    r42343 r43571  
    5252
    5353        register_post_type(
    54             self::$post_type, array(
     54            self::$post_type,
     55            array(
    5556                'capability_type' => 'post',
    5657            )
     
    9091    function test_custom_capability_type_with_map_meta_cap() {
    9192        register_post_type(
    92             self::$post_type, array(
     93            self::$post_type,
     94            array(
    9395                'capability_type' => 'book',
    9496                'map_meta_cap'    => true,
     
    128130    function test_capability_type_post_with_one_renamed_cap() {
    129131        register_post_type(
    130             self::$post_type, array(
     132            self::$post_type,
     133            array(
    131134                'capability_type' => 'post',
    132135                'capabilities'    => array( 'edit_posts' => 'edit_books' ),
     
    168171    function test_capability_type_post_map_meta_cap_true_with_renamed_cap() {
    169172        register_post_type(
    170             self::$post_type, array(
     173            self::$post_type,
     174            array(
    171175                'capability_type' => 'post',
    172176                'map_meta_cap'    => true,
     
    212216    function test_capability_type_post_with_all_meta_caps_renamed() {
    213217        register_post_type(
    214             self::$post_type, array(
     218            self::$post_type,
     219            array(
    215220                'capability_type' => 'post',
    216221                'capabilities'    => array(
     
    256261    function test_capability_type_post_with_all_meta_caps_renamed_mapped() {
    257262        register_post_type(
    258             self::$post_type, array(
     263            self::$post_type,
     264            array(
    259265                'capability_type' => 'post',
    260266                'map_meta_cap'    => true,
Note: See TracChangeset for help on using the changeset viewer.