Make WordPress Core

Opened 3 weeks ago

Closed 2 weeks ago

#63346 closed defect (bug) (fixed)

[Coding Standard]: Use self:: instead of class name for static member reference in WP_Http class

Reported by: dilipbheda's profile dilipbheda Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: HTTP API Keywords: has-patch
Focuses: coding-standards Cc:

Description

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'] );

Change History (3)

This ticket was mentioned in PR #8739 on WordPress/wordpress-develop by @dilipbheda.


3 weeks ago
#1

#2 @SergeyBiryukov
3 weeks ago

  • Milestone changed from Awaiting Review to 6.9

#3 @SergeyBiryukov
2 weeks ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 60191:

Coding Standards: Use self:: for static member reference in WP_Http.

This resolves a PHPCS error:

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

Follow-up to [20767], [37428], [38164].

Props dilipbheda.
Fixes #63346.

Note: See TracTickets for help on using tickets.