[wp-trac] [WordPress Trac] #58220: Replace usage of substr with str_starts_with and str_ends_with

WordPress Trac noreply at wordpress.org
Sat Jun 24 13:52:27 UTC 2023


#58220: Replace usage of substr with str_starts_with and str_ends_with
------------------------------+-----------------------------
 Reporter:  Soean             |       Owner:  SergeyBiryukov
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  6.3
Component:  General           |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:  performance
------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"56017" 56017]:
 {{{
 #!CommitTicketReference repository="" revision="56017"
 Coding Standards: Use Yoda condition in `str_ends_with()`.

 This resolves a WPCS error:
 {{{
 Use Yoda Condition checks, you must.
 }}}

 Follow-up to [56015], [56016].

 See #58220.
 }}}

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


More information about the wp-trac mailing list