Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#44454 closed defect (bug) (fixed)

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

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

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 8 years ago.
44454-2.diff (818 bytes ) - added by subrataemfluence 8 years ago.
44454-3.diff (816 bytes ) - added by subrataemfluence 8 years ago.

Download all attachments as: .zip

Change History (12)

#1 @netweb
8 years ago

  • Keywords needs-refresh added
  • Milestone Awaiting Review5.0

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

#2 @pento
8 years ago

  • Milestone 5.05.0.1

#3 @SergeyBiryukov
8 years ago

  • Summary Argument type in PHODoc comment does not match with the parameter typeArgument type in PHPDoc comment does not match with the parameter type

#4 @pento
8 years ago

  • Milestone 5.0.15.0.2

#5 @pento
8 years ago

  • Milestone 5.0.25.0.3

#6 @audrasjb
8 years ago

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

#7 @audrasjb
8 years ago

  • Milestone 5.0.35.1

Hi,

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

#8 @pento
8 years ago

  • Owner set to pento
  • Status newassigned

#9 @pento
8 years ago

  • Resolutionfixed
  • Status assignedclosed

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.