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

    r42365 r43571  
    99        $c = self::factory()->category->create();
    1010
    11         $found = get_category_link( $c );
     11        $found    = get_category_link( $c );
    1212        $expected = home_url( '?cat=' . $c );
    1313
     
    2121        register_taxonomy( 'wptests_tax', 'post' );
    2222
    23         $t = self::factory()->term->create( array(
    24             'taxonomy' => 'wptests_tax',
    25             'slug'     => 'test-term',
    26         ) );
     23        $t = self::factory()->term->create(
     24            array(
     25                'taxonomy' => 'wptests_tax',
     26                'slug'     => 'test-term',
     27            )
     28        );
    2729
    2830        $term = get_term( $t );
    2931
    30         $found = get_category_link( $t );
     32        $found    = get_category_link( $t );
    3133        $expected = home_url( '?wptests_tax=test-term' );
    3234
     
    4042        register_taxonomy( 'wptests_tax', 'post' );
    4143
    42         $t = self::factory()->term->create( array(
    43             'taxonomy' => 'wptests_tax',
    44             'slug'     => 'test-term',
    45         ) );
     44        $t = self::factory()->term->create(
     45            array(
     46                'taxonomy' => 'wptests_tax',
     47                'slug'     => 'test-term',
     48            )
     49        );
    4650
    4751        clean_term_cache( $t );
    4852
    49         $found = get_category_link( $t );
     53        $found    = get_category_link( $t );
    5054        $expected = home_url( '?wptests_tax=test-term' );
    5155
Note: See TracChangeset for help on using the changeset viewer.