[wp-trac] [WordPress Trac] #45849: Missing @return statement in function
WordPress Trac
noreply at wordpress.org
Mon Jan 7 07:36:16 UTC 2019
#45849: Missing @return statement in function
------------------------------------+-----------------------------
Reporter: subrataemfluence | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 5.0.2
Severity: normal | Keywords: dev-feedback
Focuses: docs, coding-standards |
------------------------------------+-----------------------------
Are we already tracking the following or fixed already?
If not, `get_admin_page_parent` function in `wp-admin/includes/plugin.php`
has no `return` type specified in its Doc block.
Also, it does not have a signature for `$parent` argument in Doc block as
well.
I think the Doc block may be rewritten in the following manner:
{{{
/**
*
* @global string $parent_file
* @global array $menu
* @global array $submenu
* @global string $pagenow
* @global string $typenow
* @global string $plugin_page
* @global array $_wp_real_parent_file
* @global array $_wp_menu_nopriv
* @global array $_wp_submenu_nopriv
*
* $parent string. Name of admin page parent. Default is empty when
current page has no parent.
* @return string.
*/
function get_admin_page_parent( $parent = '' ) {
...
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45849>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list