WordPress.org

Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#48455 new defect (bug)

Missing Yoda condition

Reported by: 1naveengiri Owned by:
Milestone: 5.4 Priority: normal
Severity: normal Version: 5.3
Component: Administration Keywords: has-patch needs-testing
Focuses: coding-standards Cc:
PR Number:

Description

Attachments (2)

48455.patch (6.3 KB) - added by Marcio Zebedeu 3 weeks ago.
adding Yoda conditions
48455.1.patch (5.6 KB) - added by Marcio Zebedeu 3 weeks ago.
adding Yoda conditions

Download all attachments as: .zip

Change History (12)

#2 @alishankhan
3 weeks ago

@1naveengiri Do we really need yoda conditions since it does not provide much advantage. But do take aways readiablity.

#4 in reply to: ↑ 3 ; follow-up: @alishankhan
3 weeks ago

Replying to 1naveengiri:

https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#yoda-conditions
Based on WP coding standards, Yes we need.

ohh.. Okay
Thanks

#5 in reply to: ↑ 4 ; follow-up: @Marcio Zebedeu
3 weeks ago

Replying to alishankhan:

Replying to 1naveengiri:

https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#yoda-conditions
Based on WP coding standards, Yes we need.

ohh.. Okay
Thanks

Is anyone working on this ticket?

@Marcio Zebedeu
3 weeks ago

adding Yoda conditions

#6 @Marcio Zebedeu
3 weeks ago

  • Keywords has-patch needs-testing added; needs-patch removed

@Marcio Zebedeu
3 weeks ago

adding Yoda conditions

#7 in reply to: ↑ 5 @alishankhan
3 weeks ago

Replying to Marcio Zebedeu:

Replying to alishankhan:

Replying to 1naveengiri:

https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#yoda-conditions
Based on WP coding standards, Yes we need.

ohh.. Okay
Thanks

Is anyone working on this ticket?

yep I was, but no problem.Cheers!!

#8 follow-up: @alishankhan
3 weeks ago

@marcio-zebedeu
Please rebase your diff.

#9 in reply to: ↑ 8 @alishankhan
3 weeks ago

Replying to alishankhan:

@marcio-zebedeu
Please rebase your diff.

okay no need,
48455.1.patch​ is already rebased.

#10 @SergeyBiryukov
3 weeks ago

  • Component changed from General to Administration
  • Milestone changed from Awaiting Review to 5.4
Note: See TracTickets for help on using tickets.