WordPress.org

Make WordPress Core

Opened 7 weeks ago

Last modified 6 weeks ago

#48350 reviewing enhancement

Stricter docs for WP_Http::processHeaders()

Reported by: marekdedic Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: minor Version: 5.2
Component: HTTP API Keywords: good-first-bug has-patch
Focuses: docs Cc:
PR Number:

Description

I believe the function could better document the parameter and return types. From a look at the source, maybe something like this:

@param string|string[] $headers
@param string          $url

@return array {
    @type array $response {
        @type int    $code
        @type string $message
    }
    @type string|string[]  $newheaders
    @type WP_Http_Cookie[] $cookies
}

+ comments obviously.

Attachments (1)

48350.diff (1.5 KB) - added by valchovski 6 weeks ago.

Download all attachments as: .zip

Change History (5)

#1 @johnbillion
7 weeks ago

  • Keywords needs-patch good-first-bug added

#2 @desrosj
7 weeks ago

  • Milestone changed from Awaiting Review to 5.4

@valchovski
6 weeks ago

#3 @valchovski
6 weeks ago

  • Keywords has-patch added; needs-patch removed

Heya!

Attached a file containing expanded documentation for processHeaders().

Looking forward to any feedback!

#4 @SergeyBiryukov
6 weeks ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.