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

WordPress Trac noreply at wordpress.org
Tue Sep 10 22:29:16 UTC 2024


#62033: Fix missing Yoda Conditions
-------------------------------+-----------------------------
 Reporter:  debarghyabanerjee  |      Owner:  (none)
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  General            |    Version:
 Severity:  normal             |   Keywords:
  Focuses:  coding-standards   |
-------------------------------+-----------------------------
 I noticed that Yoda conditions are not consistently used. This oversight
 appears in several areas of the codebase. It is important to address these
 inconsistencies to align with the coding standards and best practices.

 I am mentioning the files, where I have encountered these missing Yoda
 conditions, however there can be more instances as well.

 wp-admin/includes/misc.php
 wp-admin/includes/upgrade.php
 wp-admin/menu-header.php
 wp-admin/update-core.php
 wp-includes/blocks.php
 wp-includes/class-wp-query.php
 wp-includes/class-wpdb.php
 wp-includes/formatting.php
 wp-includes/functions.php
 wp-includes/meta.php
 wp-includes/ms-load.php
 wp-includes/rest-api.php
 wp-includes/template.php
 wp-login.php

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


More information about the wp-trac mailing list