mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2812,7 +2812,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_ASC() {
|
||||
$now = current_time( 'mysql', 1 );
|
||||
$comments = self::factory()->comment->create_many(
|
||||
5, array(
|
||||
5,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
'comment_date_gmt' => $now,
|
||||
)
|
||||
@@ -2836,7 +2837,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_DESC() {
|
||||
$now = current_time( 'mysql', 1 );
|
||||
$comments = self::factory()->comment->create_many(
|
||||
5, array(
|
||||
5,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
'comment_date_gmt' => $now,
|
||||
)
|
||||
@@ -3422,7 +3424,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
*/
|
||||
public function test_it_should_be_possible_to_modify_meta_query_using_pre_get_comments_action() {
|
||||
$comments = self::factory()->comment->create_many(
|
||||
2, array(
|
||||
2,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
)
|
||||
);
|
||||
@@ -3459,7 +3462,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
*/
|
||||
public function test_it_should_be_possible_to_modify_meta_params_using_pre_get_comments_action() {
|
||||
$comments = self::factory()->comment->create_many(
|
||||
2, array(
|
||||
2,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
)
|
||||
);
|
||||
@@ -3772,7 +3776,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$top_level_comments = self::factory()->comment->create_many(
|
||||
3, array(
|
||||
3,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
'comment_approved' => '1',
|
||||
)
|
||||
@@ -3813,7 +3818,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$top_level_comments = self::factory()->comment->create_many(
|
||||
3, array(
|
||||
3,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
'comment_approved' => '1',
|
||||
)
|
||||
@@ -3889,7 +3895,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$query_args = array_merge(
|
||||
$args, array(
|
||||
$args,
|
||||
array(
|
||||
'post_id' => self::$post_id,
|
||||
)
|
||||
);
|
||||
@@ -3967,7 +3974,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$query_args = array_merge(
|
||||
$args, array(
|
||||
$args,
|
||||
array(
|
||||
'post_id' => self::$post_id,
|
||||
)
|
||||
);
|
||||
@@ -4012,7 +4020,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$top_level_comments = self::factory()->comment->create_many(
|
||||
3, array(
|
||||
3,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
'comment_approved' => '1',
|
||||
)
|
||||
@@ -4068,7 +4077,8 @@ class Tests_Comment_Query extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
$top_level_comments = self::factory()->comment->create_many(
|
||||
3, array(
|
||||
3,
|
||||
array(
|
||||
'comment_post_ID' => self::$post_id,
|
||||
'comment_approved' => '1',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user