Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#5031 closed defect (bug) (fixed)

Invalid PHPDoc: @return The one true BuddyPress Instance

Reported by: tivnet's profile tivnet Owned by: djpaul's profile djpaul
Milestone: 1.8 Priority: normal
Severity: normal Version: 1.7
Component: Core Keywords: needs-patch
Cc:

Description

@return must specify a type. In this case, it's class BuddyPress

A correct way would be:

 * @return BuddyPress The one true BuddyPress Instance
 */
public static function instance() {

and

 * @return BuddyPress The one true BuddyPress Instance
 */
function buddypress() {
	return BuddyPress::instance();
}

Note also the proper capitalization of BuddyPress in the return statement.

Change History (2)

#1 @djpaul
11 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 7228:

Quick audit of existing phpDoc @param, @return, and @since parameters. Fixes #5031

#2 @DJPaul
11 years ago

  • Milestone changed from Awaiting Review to 1.8

Thanks for the heads-up. I fixed this up, and a bunch of other obvious illegal syntax in @param, @return, @since params.
This is not to say our phpDoc is perfect. Many functions are missing parameter or return type documentation, but most of these seem to be pretty old (we only really started phpDoc'ing properly during the BP 1.5 release), so we'll have to iterate on everything going forward.

Note: See TracTickets for help on using tickets.