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/comment/getPageOfComment.php

    r42343 r43571  
    6565
    6666        $this->assertEquals(
    67             2, get_page_of_comment(
    68                 $trackbacks[0], array(
     67            2,
     68            get_page_of_comment(
     69                $trackbacks[0],
     70                array(
    6971                    'per_page' => 2,
    7072                    'type'     => 'trackback',
     
    7375        );
    7476        $this->assertEquals(
    75             3, get_page_of_comment(
    76                 $pingbacks[0], array(
     77            3,
     78            get_page_of_comment(
     79                $pingbacks[0],
     80                array(
    7781                    'per_page' => 2,
    7882                    'type'     => 'pingback',
     
    8185        );
    8286        $this->assertEquals(
    83             5, get_page_of_comment(
    84                 $trackbacks[0], array(
     87            5,
     88            get_page_of_comment(
     89                $trackbacks[0],
     90                array(
    8591                    'per_page' => 2,
    8692                    'type'     => 'pings',
     
    137143        // Prime cache for trackbacks.
    138144        $page_trackbacks = get_page_of_comment(
    139             $trackbacks[1], array(
     145            $trackbacks[1],
     146            array(
    140147                'per_page' => 3,
    141148                'type'     => 'trackback',
     
    146153        $num_queries   = $wpdb->num_queries;
    147154        $page_comments = get_page_of_comment(
    148             $comment, array(
     155            $comment,
     156            array(
    149157                'per_page' => 3,
    150158                'type'     => 'comment',
Note: See TracChangeset for help on using the changeset viewer.