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/category/getTheCategoryById.php

    r42367 r43571  
    77class Tests_Category_GetTheCategoryById extends WP_UnitTestCase {
    88    public function test_success() {
    9         $c = self::factory()->category->create( array(
    10             'name' => 'Foo',
    11         ) );
     9        $c = self::factory()->category->create(
     10            array(
     11                'name' => 'Foo',
     12            )
     13        );
    1214
    1315        $found = get_the_category_by_ID( $c );
     
    2224        register_taxonomy( 'wptests_tax', 'post' );
    2325
    24         $t = self::factory()->term->create( array(
    25             'taxonomy' => 'wptests_tax',
    26             'name'     => 'Foo',
    27         ) );
     26        $t = self::factory()->term->create(
     27            array(
     28                'taxonomy' => 'wptests_tax',
     29                'name'     => 'Foo',
     30            )
     31        );
    2832
    2933        $term = get_term( $t );
     
    4044        register_taxonomy( 'wptests_tax', 'post' );
    4145
    42         $t = self::factory()->term->create( array(
    43             'taxonomy' => 'wptests_tax',
    44             'name'     => 'Foo',
    45         ) );
     46        $t = self::factory()->term->create(
     47            array(
     48                'taxonomy' => 'wptests_tax',
     49                'name'     => 'Foo',
     50            )
     51        );
    4652
    4753        clean_term_cache( $t );
Note: See TracChangeset for help on using the changeset viewer.