Skip to content

Commit

Permalink
Replace CodeAnalysis/AssignmentInCondition
Browse files Browse the repository at this point in the history
Update references to account for the WPCS changes: WordPress/WordPress-Coding-Standards#2198
  • Loading branch information
GaryJones committed Jun 22, 2023
1 parent ef3d9f3 commit 78542ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ url_to_postid( $url ); // Warning + Message.
wpcom_vip_old_slug_redirect(); // Ok.
wp_old_slug_redirect(); // Warning.

// WordPress.CodeAnalysis.AssignmentInCondition.Found
// Generic.CodeAnalysis.AssignmentInCondition.Found
if ($a = 123) { // Warning.
}

Expand Down
2 changes: 1 addition & 1 deletion WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
<rule ref="Internal.LineEndings.Mixed">
<severity>1</severity>
</rule>
<rule ref="WordPress.CodeAnalysis.AssignmentInCondition.Found">
<rule ref="Generic.CodeAnalysis.AssignmentInCondition.Found">
<severity>1</severity>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode">
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $GLOBALS['wpdb'] = 'test'; // Error.
if ( true == $true ) { // Warning.
}

// WordPress.CodeAnalysis.AssignmentInCondition
// Generic.CodeAnalysis.AssignmentInCondition
if ( $test = get_post( $post ) ) { // Warning.
}

Expand Down
3 changes: 2 additions & 1 deletion WordPressVIPMinimum/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<rule ref="Universal.Operators.StrictComparisons" phpcs-only="true">
<type>warning</type>
</rule>
<rule ref="WordPress.CodeAnalysis.AssignmentInCondition"/>
<rule ref="Generic.CodeAnalysis.AssignmentInCondition"/>
<rule ref="WordPress.CodeAnalysis.AssignmentInTernaryCondition"/>
<rule ref="WordPress.PHP.StrictInArray"/>
<rule ref="WordPress.PHP.DontExtract"/>
<rule ref="WordPress.WP.CronInterval">
Expand Down

0 comments on commit 78542ec

Please sign in to comment.