File tree Expand file tree Collapse file tree 6 files changed +19
-5
lines changed Expand file tree Collapse file tree 6 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ url_to_postid( $url ); // Warning + Message.
153153wpcom_vip_old_slug_redirect (); // Ok.
154154wp_old_slug_redirect (); // Warning.
155155
156- // WordPress .CodeAnalysis.AssignmentInCondition.Found
156+ // Generic .CodeAnalysis.AssignmentInCondition.Found
157157if ($ a = 123 ) { // Warning.
158158}
159159
@@ -572,3 +572,8 @@ $_SERVER["REMOTE_ADDR"]; // Error.
572572<<<<<<< HEAD // Error.
573573
574574>>>>>>> // Error.
575+
576+ <?php
577+
578+ // WordPress.CodeAnalysis.AssignmentInTernaryCondition
579+ $ var = ($ a = 123 ) ? $ a : 0 ; // Warning.
Original file line number Diff line number Diff line change 233233 540 => 1 ,
234234 550 => 1 ,
235235 556 => 1 ,
236+ 579 => 1 ,
236237 ],
237238 'messages ' => [
238239 7 => [
Original file line number Diff line number Diff line change 179179 <rule ref =" Internal.LineEndings.Mixed" >
180180 <severity >1</severity >
181181 </rule >
182- <rule ref =" WordPress.CodeAnalysis.AssignmentInCondition.Found" >
182+ <rule ref =" Generic.CodeAnalysis.AssignmentInCondition" >
183+ <severity >1</severity >
184+ </rule >
185+ <rule ref =" WordPress.CodeAnalysis.AssignmentInTernaryCondition.FoundInTernaryCondition" >
183186 <severity >1</severity >
184187 </rule >
185188 <rule ref =" WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode" >
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ $GLOBALS['wpdb'] = 'test'; // Error.
7676if ( true == $ true ) { // Warning.
7777}
7878
79- // WordPress .CodeAnalysis.AssignmentInCondition
79+ // Generic .CodeAnalysis.AssignmentInCondition
8080if ( $ test = get_post ( $ post ) ) { // Warning.
8181}
8282
@@ -614,6 +614,9 @@ class MyClass {
614614>>>>>>> // Error.
615615<?php
616616
617+ // WordPress.CodeAnalysis.AssignmentInTernaryCondition
618+ $ var = ( $ test = get_post ( $ post ) ) ? $ test : '' ; // Warning.
619+
617620// Squiz.WhiteSpace.SuperfluousWhitespace
618621// Error. ?>
619622
Original file line number Diff line number Diff line change 197197 597 => 1 ,
198198 612 => 1 ,
199199 614 => 1 ,
200- 618 => 1 ,
200+ 621 => 1 ,
201201 ],
202202 'warnings ' => [
203203 32 => 1 ,
290290 559 => 1 ,
291291 565 => 1 ,
292292 589 => 1 ,
293+ 618 => 1 ,
293294 ],
294295 'messages ' => [
295296 130 => [
Original file line number Diff line number Diff line change 3939 <rule ref =" Universal.Operators.StrictComparisons" phpcs-only =" true" >
4040 <type >warning</type >
4141 </rule >
42- <rule ref =" WordPress.CodeAnalysis.AssignmentInCondition" />
42+ <rule ref =" Generic.CodeAnalysis.AssignmentInCondition" />
43+ <rule ref =" WordPress.CodeAnalysis.AssignmentInTernaryCondition" />
4344 <rule ref =" WordPress.PHP.StrictInArray" />
4445 <rule ref =" WordPress.PHP.DontExtract" />
4546 <rule ref =" WordPress.WP.CronInterval" >
You can’t perform that action at this time.
0 commit comments