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/rest-api/rest-schema-sanitization.php

    r42343 r43571  
    145145        );
    146146        $this->assertEquals(
    147             array( '1', '2' ), rest_sanitize_value_from_schema(
     147            array( '1', '2' ),
     148            rest_sanitize_value_from_schema(
    148149                array(
    149150                    'first'  => '1',
    150151                    'second' => '2',
    151                 ), $schema
     152                ),
     153                $schema
    152154            )
    153155        );
     
    169171                'a' => 1,
    170172                'b' => 1,
    171             ), rest_sanitize_value_from_schema(
     173            ),
     174            rest_sanitize_value_from_schema(
    172175                array(
    173176                    'a' => '1',
    174177                    'b' => 1,
    175                 ), $schema
     178                ),
     179                $schema
    176180            )
    177181        );
     
    191195        $this->assertEquals( array( 'a' => 1 ), rest_sanitize_value_from_schema( array( 'a' => '1' ), $schema ) );
    192196        $this->assertEquals(
    193             array( 'a' => 1 ), rest_sanitize_value_from_schema(
     197            array( 'a' => 1 ),
     198            rest_sanitize_value_from_schema(
    194199                array(
    195200                    'a' => '1',
    196201                    'b' => 1,
    197                 ), $schema
     202                ),
     203                $schema
    198204            )
    199205        );
Note: See TracChangeset for help on using the changeset viewer.