Make WordPress Core

Opened 13 months ago

Last modified 13 months ago

#58501 new defect (bug)

Need to change in docs comment in xmlrpc.php

Reported by: hiren1094's profile hiren1094 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch reporter-feedback
Focuses: docs Cc:

Description

Hello,

Need to change below the comment for this "logIO()" function.

Need to change comment "logIO() - Writes logging info to a file." line and It should be "Writes logging info to a file - logIO()." Also, add a full stop in the last for this line "@param string $io Whether input or output"

As per phpcs coding standard.

Attachments (1)

58501.patch (623 bytes) - added by hiren1094 13 months ago.
Patch Added

Download all attachments as: .zip

Change History (6)

@hiren1094
13 months ago

Patch Added

#1 @hiren1094
13 months ago

  • Keywords has-patch added; needs-patch removed

#2 @audrasjb
13 months ago

  • Keywords reporter-feedback added

Hello and thanks for the ticket,

Could you please quickly explain why "Writes logging info to a file - logIO()." would be better or more understandable than "logIO() - Writes logging info to a file."? Thanks!

#3 follow-up: @hiren1094
13 months ago

Hello @audrasjb,

As per phpcs standard, Doc comment short description must start with a capital letter so that's why I have changed the sequence because we don't change function name in comment.

#4 in reply to: ↑ 3 @audrasjb
13 months ago

Replying to hiren1094:

As per phpcs standard, Doc comment short description must start with a capital letter so that's why I have changed the sequence because we don't change function name in comment.

I think this rule actually doesn't apply to PHP functions, proper nouns or other nouns that need to be written with a first lowercase letter.

#5 @hiren1094
13 months ago

@audrasjb

I think you are correct, but I have one suggestion: we need to remove function name in a comment and keep "Writes logging info to a file." text compared to other function comments.

Note: See TracTickets for help on using tickets.