WordPress.org

Make WordPress Core


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

    r42343 r43571  
    77    public function test_should_return_false_for_non_publicly_queryable_types() {
    88        register_post_type(
    9             'wptests_pt', array(
     9            'wptests_pt',
     10            array(
    1011                'publicly_queryable' => false,
    1112                '_builtin'           => false,
     
    2122    public function test_should_return_true_for_publicly_queryable_types() {
    2223        register_post_type(
    23             'wptests_pt', array(
     24            'wptests_pt',
     25            array(
    2426                'publicly_queryable' => true,
    2527                '_builtin'           => false,
     
    3537    public function test_should_return_false_for_builtin_nonpublic_types() {
    3638        register_post_type(
    37             'wptests_pt', array(
     39            'wptests_pt',
     40            array(
    3841                'publicly_queryable' => false,
    3942                '_builtin'           => true,
     
    4952    public function test_should_return_false_for_nonbuiltin_public_types() {
    5053        register_post_type(
    51             'wptests_pt', array(
     54            'wptests_pt',
     55            array(
    5256                'publicly_queryable' => false,
    5357                '_builtin'           => false,
     
    6367    public function test_should_return_true_for_builtin_public_types() {
    6468        register_post_type(
    65             'wptests_pt', array(
     69            'wptests_pt',
     70            array(
    6671                'publicly_queryable' => false,
    6772                '_builtin'           => true,
     
    8893    public function test_should_accept_post_type_name() {
    8994        register_post_type(
    90             'wptests_pt', array(
     95            'wptests_pt',
     96            array(
    9197                'publicly_queryable' => true,
    9298                '_builtin'           => false,
Note: See TracChangeset for help on using the changeset viewer.