Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (8 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-pages-controller.php

    r43087 r43571  
    8787                                'slug',
    8888                                'status',
    89                         ), $keys
     89                        ),
     90                        $keys
    9091                );
    9192        }
    … …  
    466467                $obj      = get_post( $page_id );
    467468                $response = $endpoint->prepare_item_for_response( $obj, $request );
    468                 $this->assertEquals( array(
    469                         'id',
    470                         'slug',
    471                 ), array_keys( $response->get_data() ) );
     469                $this->assertEquals(
     470                        array(
     471                                'id',
     472                                'slug',
     473                        ),
     474                        array_keys( $response->get_data() )
     475                );
    472476        }
    473477
    474478        public function test_get_pages_params() {
    475479                $this->factory->post->create_many(
    476                         8, array(
     480                        8,
     481                        array(
    477482                                'post_type' => 'page',
    478483                        )
Note: See TracChangeset for help on using the changeset viewer.