Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#44454 closed defect (bug) (fixed)

Argument type in PHPDoc comment does not match with the parameter type

Reported by: subrataemfluence's profile subrataemfluence Owned by: pento's profile pento
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.1
Component: Cache API Keywords: has-patch
Focuses: docs, coding-standards Cc:

Description

File: /wp-includes/cache.php

<?php
...
* @param string     $force  Optional. Unused. Whether to force a refetch rather than relying on the local
...
public function get( $key, $group = 'default', $force = false, &$found = null ) {
  ...
}

Should be:

<?php
* @param bool     $force  Optional. Unused. Whether to force a refetch rather than relying on the local

Attachments (3)

44454.diff (816 bytes) - added by subrataemfluence 7 years ago.
44454-2.diff (818 bytes) - added by subrataemfluence 7 years ago.
44454-3.diff (816 bytes) - added by subrataemfluence 7 years ago.

Download all attachments as: .zip

Change History (12)

#1 @netweb
7 years ago

  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to 5.0

Spacing needs an update after the change in 44454.diff please @subrataemfluence

#2 @pento
6 years ago

  • Milestone changed from 5.0 to 5.0.1

#3 @SergeyBiryukov
6 years ago

  • Summary changed from Argument type in PHODoc comment does not match with the parameter type to Argument type in PHPDoc comment does not match with the parameter type

#4 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#5 @pento
6 years ago

  • Milestone changed from 5.0.2 to 5.0.3

#6 @audrasjb
6 years ago

  • Keywords has-patch added; needs-patch needs-refresh removed

#7 @audrasjb
6 years ago

  • Milestone changed from 5.0.3 to 5.1

Hi,

Per today's bug scrub, we are going to address Docs enhancements in 5.1, coming next month.

#8 @pento
6 years ago

  • Owner set to pento
  • Status changed from new to assigned

#9 @pento
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 44601:

Docs: Fix the WP_Object_Cache::get() docblock.

The $force parameter is a bool, not a string. The matching wp_cache_get() docblock has the correct type.

Props subrataemfluence.
Fixes #44454.

Note: See TracTickets for help on using tickets.