Opened 7 years ago
Closed 6 years ago
#44028 closed defect (bug) (duplicate)
Conditional Statements are not meeting Yoda Conditions Coding Standards
Reported by: | seusmaniqbal | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | administration, coding-standards | Cc: |
Description
A lot of conditional statements are not meeting Yoda conditions coding standards. Variables are placed on the left side instead of right side.
https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#yoda-conditions
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-pclzip.php#L3636
Attachments (2)
Change History (7)
This ticket was mentioned in Slack in #core by abdullahramzan. View the logs.
7 years ago
#5
@
6 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Welcome to Trac @seusmaniqbal, apologies for not seeing this ticket earlier.
I'm going to also mark this ticket a duplicate, in #42885 an ongoing discussion regarding cores use of yoda conditions is taking place, once a decision has been reached then we will update the codebase with patches on that ticket.
Yoda conditions fixes