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/shortcode.php

    r42837 r43571  
    4949                    'foo' => 'no foo',
    5050                    'baz' => 'default baz',
    51                 ), $atts, 'bartag'
     51                ),
     52                $atts,
     53                'bartag'
    5254            )
    5355        );
     
    165167                'foo' => 'asdf',
    166168                'bar' => 'bing',
    167             ), $this->atts
     169            ),
     170            $this->atts
    168171        );
    169172        $this->assertEquals( 'test-shortcode-tag', $this->tagname );
     
    190193                'foo' => 'bar',
    191194                'baz' => 'bing',
    192             ), $this->atts
     195            ),
     196            $this->atts
    193197        );
    194198        $this->assertEquals( 'content', $this->content );
     
    224228                0 => 'something in quotes',
    225229                1 => 'something else',
    226             ), $this->atts
     230            ),
     231            $this->atts
    227232        );
    228233        $this->assertEquals( 'test-shortcode-tag', $this->tagname );
     
    239244                3 => 'foo',
    240245                4 => 'bar',
    241             ), $this->atts
     246            ),
     247            $this->atts
    242248        );
    243249        $this->assertEquals( 'test-shortcode-tag', $this->tagname );
     
    253259                1     => 'foo',
    254260                'bar' => 'baz',
    255             ), $this->atts
     261            ),
     262            $this->atts
    256263        );
    257264        $this->assertEquals( 'test-shortcode-tag', $this->tagname );
     
    358365                'foo' => 'bar',
    359366                'baz' => '123',
    360             ), $this->atts
     367            ),
     368            $this->atts
    361369        );
    362370        $this->assertEquals( '', $this->content );
     
    373381                'foo' => 'bar',
    374382                'abc' => 'def',
    375             ), $this->atts
     383            ),
     384            $this->atts
    376385        );
    377386        $this->assertEquals( '', $this->content );
     
    459468                'foo' => 'foo1',
    460469                'baz' => 'default baz',
    461             ), $this->filter_atts_out
     470            ),
     471            $this->filter_atts_out
    462472        );
    463473        $this->assertEquals(
     
    465475                'foo' => 'no foo',
    466476                'baz' => 'default baz',
    467             ), $this->filter_atts_pairs
     477            ),
     478            $this->filter_atts_pairs
    468479        );
    469480        $this->assertEquals( array( 'foo' => 'foo1' ), $this->filter_atts_atts );
     
    923934                1   => 'bar',
    924935                2   => 'baz',
    925             ), $this->atts
     936            ),
     937            $this->atts
    926938        );
    927939    }
     
    937949                0 => 'something in quotes',
    938950                1 => 'something else',
    939             ), $this->atts
     951            ),
     952            $this->atts
    940953        );
    941954        $this->assertEquals( 'test-shortcode-tag', $this->tagname );
     
    956969                'bar'     => 'baz',
    957970                'example' => 'test',
    958             ), $this->atts
     971            ),
     972            $this->atts
    959973        );
    960974        $this->assertEquals( 'test-shortcode-tag', $this->tagname );
Note: See TracChangeset for help on using the changeset viewer.