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-post-statuses-controller.php

    r43087 r43571  
    6060                'trash',
    6161                'future',
    62             ), array_keys( $data )
     62            ),
     63            array_keys( $data )
    6364        );
    6465    }
     
    139140        $request->set_param( '_fields', 'id,name' );
    140141        $response = $endpoint->prepare_item_for_response( $obj, $request );
    141         $this->assertEquals( array(
    142             // 'id' doesn't exist in this context.
    143             'name',
    144         ), array_keys( $response->get_data() ) );
     142        $this->assertEquals(
     143            array(
     144                // 'id' doesn't exist in this context.
     145                'name',
     146            ),
     147            array_keys( $response->get_data() )
     148        );
    145149    }
    146150
     
    170174
    171175        register_rest_field(
    172             'status', 'my_custom_int', array(
     176            'status',
     177            'my_custom_int',
     178            array(
    173179                'schema'          => $schema,
    174180                'get_callback'    => array( $this, 'additional_field_get_callback' ),
     
    209215            array(
    210216                'archives',
    211             ), array_keys( $links )
     217            ),
     218            array_keys( $links )
    212219        );
    213220    }
Note: See TracChangeset for help on using the changeset viewer.