[wp-trac] [WordPress Trac] #63346: [Coding Standard]: Use self:: instead of class name for static member reference in WP_Http class

WordPress Trac noreply at wordpress.org
Fri Apr 25 06:52:30 UTC 2025


#63346: [Coding Standard]: Use self:: instead of class name for static member
reference in WP_Http class
------------------------------+-----------------------------
 Reporter:  dilipbheda        |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  HTTP API          |    Version:
 Severity:  normal            |   Keywords:  has-patch
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 This issue proposes a minor refactor to improve code maintainability and
 ensure proper static context within the class.

 Find the following PHPCS error:

 {{{
 phpcs: error
 Squiz.Classes.SelfMemberReference.NotUsed - Must use "self::" for local
 static member reference
 }}}


 **Current Code:**

 {{{
 WP_Http::normalize_cookies( $parsed_args['cookies'] );
 }}}


 **Proposed Change:**

 {{{
 self::normalize_cookies( $parsed_args['cookies'] );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63346>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list