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

    r42343 r43571  
    1313                'feed' => get_default_feed(),
    1414                'p'    => $post_id,
    15             ), home_url( '/' )
     15            ),
     16            home_url( '/' )
    1617        );
    1718
     
    3334        $post_id       = self::factory()->post->create();
    3435        $attachment_id = self::factory()->attachment->create_object(
    35             'image.jpg', $post_id, array(
     36            'image.jpg',
     37            $post_id,
     38            array(
    3639                'post_mime_type' => 'image/jpeg',
    3740                'post_type'      => 'attachment',
     
    4447                'feed' => get_default_feed(),
    4548                'p'    => $attachment_id,
    46             ), home_url( '/' )
     49            ),
     50            home_url( '/' )
    4751        );
    4852
     
    5963        );
    6064        $attachment_id = self::factory()->attachment->create_object(
    61             'image.jpg', $post_id, array(
     65            'image.jpg',
     66            $post_id,
     67            array(
    6268                'post_mime_type' => 'image/jpeg',
    6369                'post_type'      => 'attachment',
     
    7985        $post_id       = self::factory()->post->create();
    8086        $attachment_id = self::factory()->attachment->create_object(
    81             'image.jpg', $post_id, array(
     87            'image.jpg',
     88            $post_id,
     89            array(
    8290                'post_mime_type' => 'image/jpeg',
    8391                'post_type'      => 'attachment',
     
    93101    public function test_unattached_link() {
    94102        $attachment_id = self::factory()->attachment->create_object(
    95             'image.jpg', 0, array(
     103            'image.jpg',
     104            0,
     105            array(
    96106                'post_mime_type' => 'image/jpeg',
    97107                'post_type'      => 'attachment',
     
    104114                'feed'          => get_default_feed(),
    105115                'attachment_id' => $attachment_id,
    106             ), home_url( '/' )
     116            ),
     117            home_url( '/' )
    107118        );
    108119
     
    114125
    115126        $attachment_id = self::factory()->attachment->create_object(
    116             'image.jpg', 0, array(
     127            'image.jpg',
     128            0,
     129            array(
    117130                'post_mime_type' => 'image/jpeg',
    118131                'post_type'      => 'attachment',
Note: See TracChangeset for help on using the changeset viewer.