WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (3 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/customize/control.php

    r42343 r43571  
    4343        do_action( 'customize_register', $this->wp_customize );
    4444        $control = new WP_Customize_Control(
    45             $this->wp_customize, 'blogname', array(
     45            $this->wp_customize,
     46            'blogname',
     47            array(
    4648                'settings' => array( 'blogname' ),
    4749            )
     
    5052
    5153        $control = new WP_Customize_Control(
    52             $this->wp_customize, 'blogname', array(
     54            $this->wp_customize,
     55            'blogname',
     56            array(
    5357                'settings' => array( 'blogname', 'non_existing' ),
    5458            )
     
    5761
    5862        $this->wp_customize->add_setting(
    59             'top_secret_message', array(
     63            'top_secret_message',
     64            array(
    6065                'capability' => 'top_secret_clearance',
    6166            )
    6267        );
    6368        $control = new WP_Customize_Control(
    64             $this->wp_customize, 'blogname', array(
     69            $this->wp_customize,
     70            'blogname',
     71            array(
    6572                'settings' => array( 'blogname', 'top_secret_clearance' ),
    6673            )
     
    6976
    7077        $control = new WP_Customize_Control(
    71             $this->wp_customize, 'no_setting', array(
     78            $this->wp_customize,
     79            'no_setting',
     80            array(
    7281                'settings' => array(),
    7382            )
     
    7685
    7786        $control = new WP_Customize_Control(
    78             $this->wp_customize, 'no_setting', array(
     87            $this->wp_customize,
     88            'no_setting',
     89            array(
    7990                'settings'   => array(),
    8091                'capability' => 'top_secret_clearance',
     
    8495
    8596        $control = new WP_Customize_Control(
    86             $this->wp_customize, 'no_setting', array(
     97            $this->wp_customize,
     98            'no_setting',
     99            array(
    87100                'settings'   => array(),
    88101                'capability' => 'edit_theme_options',
Note: See TracChangeset for help on using the changeset viewer.