Docs: Add missing `@return` tags for some `WP_Automatic_Updater` methods:

* `::is_vcs_checkout()`
* `::should_update()`
* `::send_core_update_notification_email()`

Props ankitmaru, mukesh27.
Fixes #51385.
Built from https://develop.svn.wordpress.org/trunk@49061


git-svn-id: http://core.svn.wordpress.org/trunk@48823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-09-27 08:36:06 +00:00
parent d36da091c4
commit c298458751
2 changed files with 8 additions and 3 deletions

View File

@ -62,7 +62,7 @@ class WP_Automatic_Updater {
* filesystem to the top of the drive, erring on the side of detecting a VCS * filesystem to the top of the drive, erring on the side of detecting a VCS
* checkout somewhere. * checkout somewhere.
* *
* ABSPATH is always checked in addition to whatever $context is (which may be the * ABSPATH is always checked in addition to whatever `$context` is (which may be the
* wp-content directory, for example). The underlying assumption is that if you are * wp-content directory, for example). The underlying assumption is that if you are
* using version control *anywhere*, then you should be making decisions for * using version control *anywhere*, then you should be making decisions for
* how things get updated. * how things get updated.
@ -70,6 +70,8 @@ class WP_Automatic_Updater {
* @since 3.7.0 * @since 3.7.0
* *
* @param string $context The filesystem path to check, in addition to ABSPATH. * @param string $context The filesystem path to check, in addition to ABSPATH.
* @return bool True if a VCS checkout was discovered at `$context` or ABSPATH,
* or anywhere higher. False otherwise.
*/ */
public function is_vcs_checkout( $context ) { public function is_vcs_checkout( $context ) {
$context_dirs = array( untrailingslashit( $context ) ); $context_dirs = array( untrailingslashit( $context ) );
@ -112,7 +114,7 @@ class WP_Automatic_Updater {
* *
* @since 3.7.0 * @since 3.7.0
* *
* @param bool $checkout Whether a VCS checkout was discovered at $context * @param bool $checkout Whether a VCS checkout was discovered at `$context`
* or ABSPATH, or anywhere higher. * or ABSPATH, or anywhere higher.
* @param string $context The filesystem context (a path) against which * @param string $context The filesystem context (a path) against which
* filesystem status should be checked. * filesystem status should be checked.
@ -132,6 +134,7 @@ class WP_Automatic_Updater {
* @param object $item The update offer. * @param object $item The update offer.
* @param string $context The filesystem context (a path) against which filesystem * @param string $context The filesystem context (a path) against which filesystem
* access and status should be checked. * access and status should be checked.
* @return bool True if the item should be updated, false otherwise.
*/ */
public function should_update( $type, $item, $context ) { public function should_update( $type, $item, $context ) {
// Used to see if WP_Filesystem is set up to allow unattended updates. // Used to see if WP_Filesystem is set up to allow unattended updates.
@ -242,6 +245,8 @@ class WP_Automatic_Updater {
* @since 3.7.0 * @since 3.7.0
* *
* @param object $item The update offer. * @param object $item The update offer.
* @return bool True if the site administrator is notified of a core update,
* false otherwise.
*/ */
protected function send_core_update_notification_email( $item ) { protected function send_core_update_notification_email( $item ) {
$notified = get_site_option( 'auto_core_update_notified' ); $notified = get_site_option( 'auto_core_update_notified' );

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.6-alpha-49060'; $wp_version = '5.6-alpha-49061';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.