[wp-trac] [WordPress Trac] #56791: Coding Standards fixes for WP 6.2

WordPress Trac noreply at wordpress.org
Wed Nov 30 18:31:13 UTC 2022


#56791: Coding Standards fixes for WP 6.2
----------------------------+-------------------------------
 Reporter:  desrosj         |       Owner:  (none)
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  6.2
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  coding-standards
----------------------------+-------------------------------

Comment (by SergeyBiryukov):

 In [changeset:"54917" 54917]:
 {{{
 #!CommitTicketReference repository="" revision="54917"
 Coding Standards: Fix a non-snake_case function name in `WP_Block` tests.

 As the filter is only intended for a single test, it can be converted to a
 closure instead of being declared as a function in the global namespace.
 The `remove_filter()` part is redundant, as `WP_UnitTestCase_Base` saves
 the state of filter-related globals at `set_up()` and restores them on
 `tear_down()`.

 Follow-up to [54175].

 Props jrf, SergeyBiryukov.
 See #56791.
 }}}

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


More information about the wp-trac mailing list