mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +00:00
Coding Standards: Fix and whitelist variable names.
From the `WordPress.NamingConventions.ValidVariableName` sniff, this commit fixes/whitelists all `NotSnakeCaseMemberVar`, `MemberNotSnakeCase`, and `StringNotSnakeCase` violations. It also fixes a handful of the `NotSnakeCase` violations. See #45934. git-svn-id: https://develop.svn.wordpress.org/trunk@44573 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -7,7 +7,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
function test_wp_parse_args_object() {
|
||||
$x = new MockClass;
|
||||
$x->_baba = 5;
|
||||
$x->yZ = 'baba';
|
||||
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
|
||||
$x->a = array( 5, 111, 'x' );
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@@ -43,7 +43,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
function test_wp_parse_args_defaults() {
|
||||
$x = new MockClass;
|
||||
$x->_baba = 5;
|
||||
$x->yZ = 'baba';
|
||||
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
|
||||
$x->a = array( 5, 111, 'x' );
|
||||
$d = array( 'pu' => 'bu' );
|
||||
$this->assertEquals(
|
||||
|
||||
Reference in New Issue
Block a user