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-request-validation.php

    r42343 r43571  
    1414    public function test_validate_within_min_max_range_inclusive() {
    1515        $request = new WP_REST_Request(
    16             'GET', '/wp/v2/foo', array(
     16            'GET',
     17            '/wp/v2/foo',
     18            array(
    1719                'args' => array(
    1820                    'minmaxrange' => array(
     
    3638    public function test_validate_within_min_max_range_min_exclusive() {
    3739        $request = new WP_REST_Request(
    38             'GET', '/wp/v2/foo', array(
     40            'GET',
     41            '/wp/v2/foo',
     42            array(
    3943                'args' => array(
    4044                    'minmaxrange' => array(
     
    6367    public function test_validate_within_min_max_range_max_exclusive() {
    6468        $request = new WP_REST_Request(
    65             'GET', '/wp/v2/foo', array(
     69            'GET',
     70            '/wp/v2/foo',
     71            array(
    6672                'args' => array(
    6773                    'minmaxrange' => array(
     
    9096    public function test_validate_within_min_max_range_both_exclusive() {
    9197        $request = new WP_REST_Request(
    92             'GET', '/wp/v2/foo', array(
     98            'GET',
     99            '/wp/v2/foo',
     100            array(
    93101                'args' => array(
    94102                    'minmaxrange' => array(
     
    118126    public function test_validate_greater_than_min_inclusive() {
    119127        $request = new WP_REST_Request(
    120             'GET', '/wp/v2/foo', array(
     128            'GET',
     129            '/wp/v2/foo',
     130            array(
    121131                'args' => array(
    122132                    'greaterthanmin' => array(
     
    135145    public function test_validate_greater_than_min_exclusive() {
    136146        $request = new WP_REST_Request(
    137             'GET', '/wp/v2/foo', array(
     147            'GET',
     148            '/wp/v2/foo',
     149            array(
    138150                'args' => array(
    139151                    'greaterthanmin' => array(
     
    155167    public function test_validate_less_than_max_inclusive() {
    156168        $request = new WP_REST_Request(
    157             'GET', '/wp/v2/foo', array(
     169            'GET',
     170            '/wp/v2/foo',
     171            array(
    158172                'args' => array(
    159173                    'lessthanmax' => array(
     
    172186    public function test_validate_less_than_max_exclusive() {
    173187        $request = new WP_REST_Request(
    174             'GET', '/wp/v2/foo', array(
     188            'GET',
     189            '/wp/v2/foo',
     190            array(
    175191                'args' => array(
    176192                    'lessthanmax' => array(
Note: See TracChangeset for help on using the changeset viewer.