Skip to content

Commit

Permalink
Docs: First pass at some inline docs fixes mostly made by PHPCBF.
Browse files Browse the repository at this point in the history
See #49572, #50744

git-svn-id: https://develop.svn.wordpress.org/trunk@48586 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed Jul 23, 2020
1 parent b604663 commit 285fa03
Show file tree
Hide file tree
Showing 41 changed files with 154 additions and 151 deletions.
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-filesystem-ssh2.php
Expand Up @@ -207,7 +207,7 @@ public function sftp_path( $path ) {
* @since 2.7.0
*
* @param string $command
* @param bool $returnbool
* @param bool $returnbool
* @return bool|string True on success, false on failure. String if the command was executed, `$returnbool`
* is false (default), and data from the resulting stream was retrieved.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/class-wp-list-table.php
Expand Up @@ -233,8 +233,8 @@ public function __unset( $name ) {
*
* @since 4.0.0
*
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @return mixed|bool Return value of the callback, false otherwise.
*/
public function __call( $name, $arguments ) {
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/includes/class-wp-ms-sites-list-table.php
Expand Up @@ -213,7 +213,6 @@ public function no_items() {
* @since 5.3.0
*
* @return array
*
*/
protected function get_views() {
$counts = wp_count_sites();
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/class-wp-ms-users-list-table.php
Expand Up @@ -443,8 +443,8 @@ public function column_blogs( $user ) {
*
* @since 4.3.0
*
* @param WP_User $user The current WP_User object.
* @param string $column_name The current column name.
* @param WP_User $user The current WP_User object.
* @param string $column_name The current column name.
*/
public function column_default( $user, $column_name ) {
/** This filter is documented in wp-admin/includes/class-wp-users-list-table.php */
Expand Down
18 changes: 9 additions & 9 deletions src/wp-admin/includes/class-wp-posts-list-table.php
Expand Up @@ -714,7 +714,7 @@ protected function get_sortable_columns() {
* @global WP_Query $wp_query WordPress Query object.
* @global int $per_page
* @param array $posts
* @param int $level
* @param int $level
*/
public function display_rows( $posts = array(), $level = 0 ) {
global $wp_query, $per_page;
Expand All @@ -734,7 +734,7 @@ public function display_rows( $posts = array(), $level = 0 ) {

/**
* @param array $posts
* @param int $level
* @param int $level
*/
private function _display_rows( $posts, $level = 0 ) {
$post_type = $this->screen->post_type;
Expand All @@ -759,8 +759,8 @@ private function _display_rows( $posts, $level = 0 ) {
* @global wpdb $wpdb WordPress database abstraction object.
* @global WP_Post $post Global post object.
* @param array $pages
* @param int $pagenum
* @param int $per_page
* @param int $pagenum
* @param int $per_page
*/
private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
global $wpdb;
Expand Down Expand Up @@ -865,11 +865,11 @@ private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 2
* @since 4.2.0 Added the `$to_display` parameter.
*
* @param array $children_pages
* @param int $count
* @param int $parent
* @param int $level
* @param int $pagenum
* @param int $per_page
* @param int $count
* @param int $parent
* @param int $level
* @param int $pagenum
* @param int $per_page
* @param array $to_display List of pages to be displayed. Passed by reference.
*/
private function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page, &$to_display ) {
Expand Down
Expand Up @@ -10,6 +10,7 @@
class WP_Site_Health_Auto_Updates {
/**
* WP_Site_Health_Auto_Updates constructor.
*
* @since 5.2.0
*/
public function __construct() {
Expand Down
22 changes: 11 additions & 11 deletions src/wp-admin/includes/class-wp-terms-list-table.php
Expand Up @@ -269,13 +269,13 @@ public function display_rows_or_placeholder() {

/**
* @param string $taxonomy
* @param array $terms
* @param array $children
* @param int $start
* @param int $per_page
* @param int $count
* @param int $parent
* @param int $level
* @param array $terms
* @param array $children
* @param int $start
* @param int $per_page
* @param int $count
* @param int $parent
* @param int $level
*/
private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {

Expand Down Expand Up @@ -332,8 +332,8 @@ private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$coun

/**
* @global string $taxonomy
* @param WP_Term $tag Term object.
* @param int $level
* @param WP_Term $tag Term object.
* @param int $level
*/
public function single_row( $tag, $level = 0 ) {
global $taxonomy;
Expand Down Expand Up @@ -600,8 +600,8 @@ public function column_links( $tag ) {
}

/**
* @param WP_Term $tag Term object.
* @param string $column_name
* @param WP_Term $tag Term object.
* @param string $column_name Name of the column.
* @return string
*/
public function column_default( $tag, $column_name ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/dashboard.php
Expand Up @@ -1167,7 +1167,7 @@ function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
* @since 2.5.0
*
* @param string $widget_id
* @param array $form_inputs
* @param array $form_inputs
*/
function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) {
$widget_options = get_option( 'dashboard_widget_options' );
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/image.php
Expand Up @@ -468,8 +468,8 @@ function _wp_make_subsizes( $new_sizes, $file, $image_meta, $attachment_id ) {
*
* @since 2.1.0
*
* @param int $attachment_id Attachment Id to process.
* @param string $file Filepath of the Attached image.
* @param int $attachment_id Attachment Id to process.
* @param string $file Filepath of the Attached image.
* @return mixed Metadata for attachment.
*/
function wp_generate_attachment_metadata( $attachment_id, $file ) {
Expand Down
32 changes: 16 additions & 16 deletions src/wp-admin/includes/media.php
Expand Up @@ -665,7 +665,7 @@ function media_buttons( $editor_id = 'content' ) {
/**
* @global int $post_ID
* @param string $type
* @param int $post_id
* @param int $post_id
* @param string $tab
* @return string
*/
Expand Down Expand Up @@ -1086,7 +1086,7 @@ function media_upload_library() {
* @since 2.7.0
*
* @param WP_Post $post
* @param string $checked
* @param string $checked
* @return string
*/
function image_align_input_fields( $post, $checked = '' ) {
Expand Down Expand Up @@ -1123,7 +1123,7 @@ function image_align_input_fields( $post, $checked = '' ) {
*
* @since 2.7.0
*
* @param WP_Post $post
* @param WP_Post $post
* @param bool|string $check
* @return array
*/
Expand Down Expand Up @@ -1202,7 +1202,7 @@ function image_size_input_fields( $post, $check = '' ) {
* @since 2.7.0
*
* @param WP_Post $post
* @param string $url_type
* @param string $url_type
* @return string
*/
function image_link_input_fields( $post, $url_type = '' ) {
Expand Down Expand Up @@ -1250,7 +1250,7 @@ function wp_caption_input_textarea( $edit_post ) {
*
* @since 2.5.0
*
* @param array $form_fields
* @param array $form_fields
* @param object $post
* @return array
*/
Expand Down Expand Up @@ -1316,9 +1316,9 @@ function image_attachment_fields_to_save( $post, $attachment ) {
*
* @since 2.5.0
*
* @param string $html
* @param string $html
* @param integer $attachment_id
* @param array $attachment
* @param array $attachment
* @return string
*/
function image_media_send_to_editor( $html, $attachment_id, $attachment ) {
Expand All @@ -1343,7 +1343,7 @@ function image_media_send_to_editor( $html, $attachment_id, $attachment ) {
* @since 2.5.0
*
* @param WP_Post $post
* @param array $errors
* @param array $errors
* @return array
*/
function get_attachment_fields_to_edit( $post, $errors = null ) {
Expand Down Expand Up @@ -1486,8 +1486,8 @@ function get_attachment_fields_to_edit( $post, $errors = null ) {
*
* @global WP_Query $wp_the_query WordPress Query object.
*
* @param int $post_id Optional. Post ID.
* @param array $errors Errors for attachment, if any.
* @param int $post_id Optional. Post ID.
* @param array $errors Errors for attachment, if any.
* @return string
*/
function get_media_items( $post_id, $errors ) {
Expand Down Expand Up @@ -1539,8 +1539,8 @@ function get_media_items( $post_id, $errors ) {
*
* @global string $redir_tab
*
* @param int $attachment_id Attachment ID for modification.
* @param string|array $args Optional. Override defaults.
* @param int $attachment_id Attachment ID for modification.
* @param string|array $args Optional. Override defaults.
* @return string HTML form for attachment.
*/
function get_media_item( $attachment_id, $args = null ) {
Expand Down Expand Up @@ -2271,8 +2271,8 @@ function media_upload_form( $errors = null ) {
*
* @since 2.5.0
*
* @param string $type
* @param object $errors
* @param string $type
* @param object $errors
* @param integer $id
*/
function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
Expand Down Expand Up @@ -2345,8 +2345,8 @@ function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
*
* @since 2.7.0
*
* @param string $type
* @param object $errors
* @param string $type
* @param object $errors
* @param integer $id
*/
function media_upload_type_url_form( $type = null, $errors = null, $id = null ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/misc.php
Expand Up @@ -903,7 +903,7 @@ function iis7_add_rewrite_rule( $filename, $rewrite_rule ) {
* @since 2.8.0
*
* @param DOMDocument $doc
* @param string $filename
* @param string $filename
*/
function saveDomDocument( $doc, $filename ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
$config = $doc->saveXML();
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/nav-menu.php
Expand Up @@ -1136,8 +1136,8 @@ function _wp_delete_orphaned_draft_menu_items() {
*
* @since 3.6.0
*
* @param int|string $nav_menu_selected_id (id, slug, or name ) of the currently-selected menu
* @param string $nav_menu_selected_title Title of the currently-selected menu
* @param int|string $nav_menu_selected_id ID, slug, or name of the currently-selected menu.
* @param string $nav_menu_selected_title Title of the currently-selected menu.
* @return array The menu updated message
*/
function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) {
Expand Down
1 change: 1 addition & 0 deletions src/wp-admin/includes/privacy-tools.php
Expand Up @@ -719,6 +719,7 @@ function wp_privacy_send_personal_data_export_email( $request_id ) {

/**
* Intercept personal data exporter page Ajax responses in order to assemble the personal data export file.
*
* @see wp_privacy_personal_data_export_page
* @since 4.9.6
*
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/schema.php
Expand Up @@ -29,8 +29,8 @@
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $scope Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or blog tables. Defaults to all.
* @param int $blog_id Optional. The site ID for which to retrieve SQL. Default is the current site ID.
* @param string $scope Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or blog tables. Defaults to all.
* @param int $blog_id Optional. The site ID for which to retrieve SQL. Default is the current site ID.
* @return string The SQL needed to create the requested tables.
*/
function wp_get_db_schema( $scope = 'all', $blog_id = null ) {
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/admin-bar.php
Expand Up @@ -1241,8 +1241,8 @@ function is_admin_bar_showing() {
* @access private
*
* @param string $context Context of this preference check. Defaults to 'front'. The 'admin'
* preference is no longer used.
* @param int $user Optional. ID of the user to check, defaults to 0 for current user.
* preference is no longer used.
* @param int $user Optional. ID of the user to check, defaults to 0 for current user.
* @return bool Whether the admin bar should be showing for this user.
*/
function _get_admin_bar_pref( $context = 'front', $user = 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/bookmark-template.php
Expand Up @@ -22,7 +22,7 @@
* @since 2.1.0
* @access private
*
* @param array $bookmarks List of bookmarks to traverse.
* @param array $bookmarks List of bookmarks to traverse.
* @param string|array $args {
* Optional. Bookmarks arguments.
*
Expand Down
13 changes: 7 additions & 6 deletions src/wp-includes/bookmark.php
Expand Up @@ -14,9 +14,10 @@
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|stdClass $bookmark
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
* an stdClass object, an associative array, or a numeric array, respectively. Default OBJECT.
* @param string $filter Optional. How to sanitize bookmark fields. Default 'raw'.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond
* to an stdClass object, an associative array, or a numeric array, respectively.
* Default OBJECT.
* @param string $filter Optional. How to sanitize bookmark fields. Default 'raw'.
* @return array|object|null Type returned depends on $output value.
*/
function get_bookmark( $bookmark, $output = OBJECT, $filter = 'raw' ) {
Expand Down Expand Up @@ -68,9 +69,9 @@ function get_bookmark( $bookmark, $output = OBJECT, $filter = 'raw' ) {
*
* @since 2.3.0
*
* @param string $field The name of the data field to return
* @param int $bookmark The bookmark ID to get field
* @param string $context Optional. The context of how the field will be used.
* @param string $field The name of the data field to return.
* @param int $bookmark The bookmark ID to get field.
* @param string $context Optional. The context of how the field will be used.
* @return string|WP_Error
*/
function get_bookmark_field( $field, $bookmark, $context = 'display' ) {
Expand Down
12 changes: 6 additions & 6 deletions src/wp-includes/cache.php
Expand Up @@ -111,12 +111,12 @@ function wp_cache_flush() {
* @see WP_Object_Cache::get()
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*
* @param int|string $key The key under which the cache contents are stored.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param bool $force Optional. Whether to force an update of the local cache
* from the persistent cache. Default false.
* @param bool $found Optional. Whether the key was found in the cache (passed by reference).
* Disambiguates a return of false, a storable value. Default null.
* @param int|string $key The key under which the cache contents are stored.
* @param string $group Optional. Where the cache contents are grouped. Default empty.
* @param bool $force Optional. Whether to force an update of the local cache
* from the persistent cache. Default false.
* @param bool $found Optional. Whether the key was found in the cache (passed by reference).
* Disambiguates a return of false, a storable value. Default null.
* @return mixed|false The cache contents on success, false on failure to retrieve contents.
*/
function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/canonical.php
Expand Up @@ -35,8 +35,8 @@
* @global WP $wp Current WordPress environment instance.
*
* @param string $requested_url Optional. The URL that was requested, used to
* figure if redirect is needed.
* @param bool $do_redirect Optional. Redirect to the new URL.
* figure if redirect is needed.
* @param bool $do_redirect Optional. Redirect to the new URL.
* @return string|void The string of the URL, if redirect needed.
*/
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
Expand Down Expand Up @@ -782,7 +782,7 @@ function lowercase_octets( $matches ) {
* @access private
*
* @param string $query_string
* @param array $args_to_check
* @param array $args_to_check
* @param string $url
* @return string The altered query string
*/
Expand Down

0 comments on commit 285fa03

Please sign in to comment.