#5031 closed defect (bug) (fixed)
Invalid PHPDoc: @return The one true BuddyPress Instance
Reported by: | tivnet | Owned by: | 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)
#2
@
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.
In 7228: