Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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/rest-api/rest-taxonomies-controller.php

    r43440 r43571  
    6565    public function test_get_items_context_edit() {
    6666        wp_set_current_user( self::$contributor_id );
    67         $request    = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' );
     67        $request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' );
    6868        $request->set_param( 'context', 'edit' );
    6969        $response   = rest_get_server()->dispatch( $request );
     
    187187        $request->set_param( '_fields', 'id,name' );
    188188        $response = $endpoint->prepare_item_for_response( $tax, $request );
    189         $this->assertEquals( array(
    190             // 'id' doesn't exist in this context.
    191             'name',
    192         ), array_keys( $response->get_data() ) );
     189        $this->assertEquals(
     190            array(
     191                // 'id' doesn't exist in this context.
     192                'name',
     193            ),
     194            array_keys( $response->get_data() )
     195        );
    193196    }
    194197
Note: See TracChangeset for help on using the changeset viewer.