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:
Gary Pendergast
2019-01-12 06:05:55 +00:00
parent cf5be804c7
commit a139c8cbf7
8 changed files with 250 additions and 194 deletions

View File

@@ -199,6 +199,7 @@ class Tests_User extends WP_UnitTestCase {
* @ticket 20043
*/
public function test_user_unset() {
// phpcs:disable WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
$user = new WP_User( self::$author_id );
// Test custom fields
@@ -207,6 +208,7 @@ class Tests_User extends WP_UnitTestCase {
unset( $user->customField );
$this->assertFalse( isset( $user->customField ) );
return $user;
// phpcs:enable
}
/**