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/link/getPreviewPostLink.php

    r42343 r43571  
    2020                'bar'     => 'baz',
    2121                'preview' => 'true',
    22             ), get_permalink( $post )
     22            ),
     23            get_permalink( $post )
    2324        );
    2425
    2526        $this->assertEquals(
    26             $expected, get_preview_post_link(
    27                 $post, array(
     27            $expected,
     28            get_preview_post_link(
     29                $post,
     30                array(
    2831                    'foo' => 'bar',
    2932                    'bar' => 'baz',
     
    3942
    4043        $this->assertEquals(
    41             $expected, get_preview_post_link(
    42                 $post, array(
     44            $expected,
     45            get_preview_post_link(
     46                $post,
     47                array(
    4348                    'foo' => 'bar',
    4449                    'bar' => 'baz',
    45                 ), 'https://google.com/'
     50                ),
     51                'https://google.com/'
    4652            )
    4753        );
     
    6470    public function test_get_preview_post_link_should_return_empty_string_for_non_viewable_post_type() {
    6571        $post_type = register_post_type(
    66             'non_viewable_cpt', array(
     72            'non_viewable_cpt',
     73            array(
    6774                'public' => false,
    6875            )
Note: See TracChangeset for help on using the changeset viewer.