Skip to content

Commit 2ec6c8f

Browse files
committed
Build Tools: Upgrade WPCS to 2.0.0.
A few sniffs have been renamed, this change includes the relevant `phpcs:ignore` comment updates. Fixes #46002. git-svn-id: https://develop.svn.wordpress.org/trunk@44645 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d3ee420 commit 2ec6c8f

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"require-dev": {
1313
"dealerdirect/phpcodesniffer-composer-installer": "~0.5.0",
14-
"wp-coding-standards/wpcs": "~1.2.0"
14+
"wp-coding-standards/wpcs": "~2.0.0"
1515
},
1616
"scripts": {
1717
"format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source",

composer.lock

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/phpunit/tests/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Tests_Functions extends WP_UnitTestCase {
77
function test_wp_parse_args_object() {
88
$x = new MockClass;
99
$x->_baba = 5;
10-
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
10+
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
1111
$x->a = array( 5, 111, 'x' );
1212
$this->assertEquals(
1313
array(
@@ -43,7 +43,7 @@ function test_wp_parse_args_array() {
4343
function test_wp_parse_args_defaults() {
4444
$x = new MockClass;
4545
$x->_baba = 5;
46-
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
46+
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
4747
$x->a = array( 5, 111, 'x' );
4848
$d = array( 'pu' => 'bu' );
4949
$this->assertEquals(

tests/phpunit/tests/user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function test_user_properties() {
199199
* @ticket 20043
200200
*/
201201
public function test_user_unset() {
202-
// phpcs:disable WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
202+
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
203203
$user = new WP_User( self::$author_id );
204204

205205
// Test custom fields

0 commit comments

Comments
 (0)