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/post/meta.php

    r43378 r43571  
    2020                self::$author = $factory->user->create_and_get( array( 'role' => 'editor' ) );
    2121
    22                 self::$post_id = $factory->post->create( array(
    23                         'post_author'  => self::$author->ID,
    24                         'post_status'  => 'publish',
    25                         'post_content' => rand_str(),
    26                         'post_title'   => rand_str(),
    27                 ) );
    28 
    29                 self::$post_id_2 = $factory->post->create( array(
    30                         'post_author'  => self::$author->ID,
    31                         'post_status'  => 'publish',
    32                         'post_content' => rand_str(),
    33                         'post_title'   => rand_str(),
    34                 ) );
     22                self::$post_id = $factory->post->create(
     23                        array(
     24                                'post_author'  => self::$author->ID,
     25                                'post_status'  => 'publish',
     26                                'post_content' => rand_str(),
     27                                'post_title'   => rand_str(),
     28                        )
     29                );
     30
     31                self::$post_id_2 = $factory->post->create(
     32                        array(
     33                                'post_author'  => self::$author->ID,
     34                                'post_status'  => 'publish',
     35                                'post_content' => rand_str(),
     36                                'post_title'   => rand_str(),
     37                        )
     38                );
    3539        }
    3640
    … …  
    305309                        array( '', 'registered_key3' ),
    306310                );
    307         }
     311        }
    308312}
Note: See TracChangeset for help on using the changeset viewer.