[wp-trac] [WordPress Trac] #58831: Coding Standards fixes for WP 6.4

WordPress Trac noreply at wordpress.org
Mon Sep 11 04:51:24 UTC 2023


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

Comment (by SergeyBiryukov):

 In [changeset:"56552" 56552]:
 {{{
 #!CommitTicketReference repository="" revision="56552"
 Code Modernization: Use `dirname()` with the `$levels` parameter.

 PHP 7.0 introduced the `$levels` parameter to the `dirname()` function,
 which means nested calls to `dirname()` are no longer needed.

 Note: This is enforced by WPCS 3.0.0.

 Reference: [https://www.php.net/manual/en/function.dirname.php PHP Manual:
 dirname()].

 Follow-up to [56141].

 Props jrf.
 See #59161, #58831.
 }}}

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


More information about the wp-trac mailing list