Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#42227 closed defect (bug) (fixed)

PHPDoc correction for src/wp-admin/includes/class-wp-filesystem-base.php

Reported by: Jaydeep Rami Owned by: SergeyBiryukov
Priority: normal Milestone: 5.2
Component: Filesystem API Version: 4.9
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses: docs

Description

There are a wrong argument type in PHPDoc. Below is file path:

/wp-admin/includes/class-wp-filesystem-base.php

Thanks,

Attachments (3)

42227.patch (2.2 KB ) - added by Jaydeep Rami 9 years ago.
Fixed: PHPDoc correction for src/wp-admin/includes/class-wp-filesystem-base.php
42227-2.patch (2.0 KB ) - added by man4toman 7 years ago.
42227-3.patch (6.3 KB ) - added by man4toman 7 years ago.

Download all attachments as: .zip

Change History (12)

@Jaydeep Rami
9 years ago

Fixed: PHPDoc correction for src/wp-admin/includes/class-wp-filesystem-base.php

#1 follow-up: @SergeyBiryukov
9 years ago

  • Component GeneralFilesystem API

Hi Jaydeep, thanks for the patch!

The existing docs for these arguments are correct, it's just that default values don't match the expected type.

  • $theme should either be documented as string|false, or the default value should be changed to an empty string, here and in get_theme_root() as well.
  • $mode should be documented as int|false, here and in other class-wp-filesystem-*.php files as well.
Last edited 7 years ago by SergeyBiryukov (previous) (diff)

#2 in reply to: ↑ 1 @Jaydeep Rami
9 years ago

Replying to SergeyBiryukov: Thank you @SergeyBiryukov, I understood. Thanks for the explanation!

Hi Jaydeep, thanks for the patch!

The existing docs for these arguments are correct, it's just that default values don't match the expected type.

  • $theme should either be documented as string|false, or the default value should be changed to an empty string, here and and in get_theme_root() as well.
  • $mode should be documented as int|false, here and in other class-wp-filesystem-*.php files as well.

#3 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review5.2
  • Owner set to SergeyBiryukov
  • Status newreviewing

Related: #46779

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


7 years ago

#5 @audrasjb
7 years ago

  • Keywords has-patch needs-refresh added

As per today's bug scrub, the patch needs a refresh to land in 5.2.

Cheers,
Jb

@man4toman
7 years ago

#6 @man4toman
7 years ago

  • Keywords needs-testing added; needs-refresh removed

@man4toman
7 years ago

#7 @man4toman
7 years ago

$mode should be documented as int|false, here and in other class-wp-filesystem-*.php files as well.

If I understand it correctly, the third patch must be OK.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


7 years ago

#9 @SergeyBiryukov
7 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 45226:

Docs: Improve documentation for various WP_Filesystem_Base methods and extending classes.

Props jaydeep-rami, man4toman, SaeedFard, mukesh27, mohadeseghasemi, ebrahimzadeh, juiiee8487, SergeyBiryukov.
Fixes #42227, #46806, #46840. See #46543.

Note: See TracTickets for help on using tickets.