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/widgets/media-widget.php

    r42343 r43571  
    7474                'add_media',
    7575                'unsupported_file_type',
    76             ), array_keys( $widget->l10n )
     76            ),
     77            array_keys( $widget->l10n )
    7778        );
    7879        $this->assertEquals( count( $widget->l10n ), count( array_filter( $widget->l10n ) ), 'Expected all translation strings to be defined.' );
     
    212213                'title',
    213214                'url',
    214             ), array_keys( $schema )
     215            ),
     216            array_keys( $schema )
    215217        );
    216218
     
    497499
    498500        $result = $has_content->invokeArgs(
    499             $this->get_mocked_class_instance(), array(
     501            $this->get_mocked_class_instance(),
     502            array(
    500503                array(
    501504                    'attachment_id' => 0,
     
    507510
    508511        $result = $has_content->invokeArgs(
    509             $this->get_mocked_class_instance(), array(
     512            $this->get_mocked_class_instance(),
     513            array(
    510514                array(
    511515                    'attachment_id' => $attachment_id,
     
    517521
    518522        $result = $has_content->invokeArgs(
    519             $this->get_mocked_class_instance(), array(
     523            $this->get_mocked_class_instance(),
     524            array(
    520525                array(
    521526                    'attachment_id' => 0,
Note: See TracChangeset for help on using the changeset viewer.