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/option/registration.php

    r42667 r43571  
    2929    public function test_register_with_array() {
    3030        register_setting(
    31             'test_group', 'test_option', array(
     31            'test_group',
     32            'test_option',
     33            array(
    3234                'sanitize_callback' => array( $this, 'filter_registered_setting' ),
    3335            )
     
    4749    public function test_register_with_default() {
    4850        register_setting(
    49             'test_group', 'test_default', array(
     51            'test_group',
     52            'test_default',
     53            array(
    5054                'default' => 'Got that Viper with them rally stripes',
    5155            )
     
    6064    public function test_register_with_default_override() {
    6165        register_setting(
    62             'test_group', 'test_default', array(
     66            'test_group',
     67            'test_default',
     68            array(
    6369                'default' => 'Got that Viper with them rally stripes',
    6470            )
     
    7581    public function test_add_option_with_no_options_cache() {
    7682        register_setting(
    77             'test_group', 'test_default', array(
     83            'test_group',
     84            'test_default',
     85            array(
    7886                'default' => 'My Default :)',
    7987            )
     
    103111    public function test_unregister_setting_removes_default() {
    104112        register_setting(
    105             'test_group', 'test_default', array(
     113            'test_group',
     114            'test_default',
     115            array(
    106116                'default' => 'Got that Viper with them rally stripes',
    107117            )
Note: See TracChangeset for help on using the changeset viewer.