[wp-trac] [WordPress Trac] #62033: Fix missing Yoda Conditions

WordPress Trac noreply at wordpress.org
Tue Sep 10 22:56:19 UTC 2024


#62033: Fix missing Yoda Conditions
-------------------------------+-------------------------------
 Reporter:  debarghyabanerjee  |       Owner:  (none)
     Type:  enhancement        |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  General            |     Version:
 Severity:  normal             |  Resolution:  wontfix
 Keywords:  has-patch          |     Focuses:  coding-standards
-------------------------------+-------------------------------
Changes (by jrf):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 @debarghyabanerjee While I understand and appreciate your wish to improve
 WordPress, in none of the cases you flagged Yoda conditions are needed as
 none of these conditions do a comparison with a variable.
 The patch would only decrease code readability for no benefit.

 Also see: https://developer.wordpress.org/coding-standards/wordpress-
 coding-standards/php/#yoda-conditions

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62033#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list