Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (8 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/query.php

    r42343 r43571  
    28132813                $now      = current_time( 'mysql', 1 );
    28142814                $comments = self::factory()->comment->create_many(
    2815                         5, array(
     2815                        5,
     2816                        array(
    28162817                                'comment_post_ID'  => self::$post_id,
    28172818                                'comment_date_gmt' => $now,
     
    28372838                $now      = current_time( 'mysql', 1 );
    28382839                $comments = self::factory()->comment->create_many(
    2839                         5, array(
     2840                        5,
     2841                        array(
    28402842                                'comment_post_ID'  => self::$post_id,
    28412843                                'comment_date_gmt' => $now,
     
    34233425        public function test_it_should_be_possible_to_modify_meta_query_using_pre_get_comments_action() {
    34243426                $comments = self::factory()->comment->create_many(
    3425                         2, array(
     3427                        2,
     3428                        array(
    34263429                                'comment_post_ID' => self::$post_id,
    34273430                        )
     
    34603463        public function test_it_should_be_possible_to_modify_meta_params_using_pre_get_comments_action() {
    34613464                $comments = self::factory()->comment->create_many(
    3462                         2, array(
     3465                        2,
     3466                        array(
    34633467                                'comment_post_ID' => self::$post_id,
    34643468                        )
     
    37733777
    37743778                $top_level_comments = self::factory()->comment->create_many(
    3775                         3, array(
     3779                        3,
     3780                        array(
    37763781                                'comment_post_ID'  => self::$post_id,
    37773782                                'comment_approved' => '1',
     
    38143819
    38153820                $top_level_comments = self::factory()->comment->create_many(
    3816                         3, array(
     3821                        3,
     3822                        array(
    38173823                                'comment_post_ID'  => self::$post_id,
    38183824                                'comment_approved' => '1',
     
    38903896
    38913897                $query_args = array_merge(
    3892                         $args, array(
     3898                        $args,
     3899                        array(
    38933900                                'post_id' => self::$post_id,
    38943901                        )
     
    39683975
    39693976                $query_args = array_merge(
    3970                         $args, array(
     3977                        $args,
     3978                        array(
    39713979                                'post_id' => self::$post_id,
    39723980                        )
     
    40134021
    40144022                $top_level_comments = self::factory()->comment->create_many(
    4015                         3, array(
     4023                        3,
     4024                        array(
    40164025                                'comment_post_ID'  => self::$post_id,
    40174026                                'comment_approved' => '1',
     
    40694078
    40704079                $top_level_comments = self::factory()->comment->create_many(
    4071                         3, array(
     4080                        3,
     4081                        array(
    40724082                                'comment_post_ID'  => self::$post_id,
    40734083                                'comment_approved' => '1',
Note: See TracChangeset for help on using the changeset viewer.