Make WordPress Core


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

    r43381 r43571  
    881881                $role_name = 'janitor';
    882882                add_role(
    883                         $role_name, 'Janitor', array(
     883                        $role_name,
     884                        'Janitor',
     885                        array(
    884886                                'level_1'          => true,
    885887                                'sweep_floor'      => true,
     
    11011103
    11021104                register_post_type(
    1103                         'something', array(
     1105                        'something',
     1106                        array(
    11041107                                'capabilities' =>
    11051108                                array(
     
    13071310                                array(
    13081311                                        $primitive_cap,
    1309                                 ), $caps, "Meta cap: {$meta_cap}"
     1312                                ),
     1313                                $caps,
     1314                                "Meta cap: {$meta_cap}"
    13101315                        );
    13111316                }
     
    13991404                $taxonomy = 'custom_cap_taxo';
    14001405                register_taxonomy(
    1401                         $taxonomy, 'post', array(
     1406                        $taxonomy,
     1407                        'post',
     1408                        array(
    14021409                                'capabilities' => $expected,
    14031410                        )
     
    14121419                                array(
    14131420                                        $primitive_cap,
    1414                                 ), $caps, "Meta cap: {$meta_cap}"
     1421                                ),
     1422                                $caps,
     1423                                "Meta cap: {$meta_cap}"
    14151424                        );
    14161425                }
     
    17151724
    17161725                register_post_type(
    1717                         'page_capability', array(
     1726                        'page_capability',
     1727                        array(
    17181728                                'capability_type' => 'page',
    17191729                        )
     
    19261936                $role_name = 'uploader';
    19271937                add_role(
    1928                         $role_name, 'Uploader', array(
     1938                        $role_name,
     1939                        'Uploader',
     1940                        array(
    19291941                                'read'         => true,
    19301942                                'upload_files' => true,
     
    19541966                $role_name = 'uploader';
    19551967                add_role(
    1956                         $role_name, 'Uploader', array(
     1968                        $role_name,
     1969                        'Uploader',
     1970                        array(
    19571971                                'read'         => true,
    19581972                                'upload_files' => true,
     
    20212035                $role_name = 'uploader';
    20222036                add_role(
    2023                         $role_name, 'Uploader', array(
     2037                        $role_name,
     2038                        'Uploader',
     2039                        array(
    20242040                                'read'         => true,
    20252041                                'upload_files' => true,
Note: See TracChangeset for help on using the changeset viewer.