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

    r42343 r43571  
    2727                'title'  => true,
    2828                'editor' => true,
    29             ), $post_type_supports
     29            ),
     30            $post_type_supports
    3031        );
    3132        $this->assertEqualSets( array(), $post_type_supports_after );
     
    3536        $post_type        = 'cpt';
    3637        $post_type_object = new WP_Post_Type(
    37             $post_type, array(
     38            $post_type,
     39            array(
    3840                'supports' => array(
    3941                    'editor',
     
    5557                'comments'  => true,
    5658                'revisions' => true,
    57             ), $post_type_supports
     59            ),
     60            $post_type_supports
    5861        );
    5962        $this->assertEqualSets( array(), $post_type_supports_after );
     
    6871        $post_type        = 'cpt';
    6972        $post_type_object = new WP_Post_Type(
    70             $post_type, array(
     73            $post_type,
     74            array(
    7175                'rewrite'   => false,
    7276                'query_var' => 'foobar',
     
    8690        $post_type        = 'cpt';
    8791        $post_type_object = new WP_Post_Type(
    88             $post_type, array(
     92            $post_type,
     93            array(
    8994                'public'    => true,
    9095                'rewrite'   => false,
     
    111116        $post_type        = 'cpt';
    112117        $post_type_object = new WP_Post_Type(
    113             $post_type, array(
     118            $post_type,
     119            array(
    114120                'public'  => true,
    115121                'rewrite' => true,
Note: See TracChangeset for help on using the changeset viewer.