[wp-trac] [WordPress Trac] #40080: Yoda condition is missing in some files

WordPress Trac noreply at wordpress.org
Thu Mar 9 14:17:59 UTC 2017


#40080: Yoda condition is missing in some files
-------------------------------------------+-----------------------------
 Reporter:  viralsampat                    |      Owner:
     Type:  defect (bug)                   |     Status:  new
 Priority:  normal                         |  Milestone:  Awaiting Review
Component:  General                        |    Version:  trunk
 Severity:  normal                         |   Keywords:
  Focuses:  accessibility, administration  |
-------------------------------------------+-----------------------------
 I have checked some core files in that inside some files I found the 'if'
 conditional statement is not obeying the rule of  'Yoda' Condition.

 As per this link https://make.wordpress.org/core/handbook/best-practices
 /coding-standards/php/#yoda-conditions . Every 'if' Statement should
 follow 'Yoda Condition' rule.

 Below is the file URL:-
 https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/post.php#L2434

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


More information about the wp-trac mailing list