diff --git a/src/wp-admin/includes/class-wp-site-health-auto-updates.php b/src/wp-admin/includes/class-wp-site-health-auto-updates.php index 581fc44600c5f..f7dd1554e4a6f 100644 --- a/src/wp-admin/includes/class-wp-site-health-auto-updates.php +++ b/src/wp-admin/includes/class-wp-site-health-auto-updates.php @@ -66,7 +66,7 @@ static function ( $test ) { * @param string $constant The name of the constant to check. * @param bool|string|array $value The value that the constant should be, if set, * or an array of acceptable values. - * @return array The test results. + * @return ?array The test results, or null if the test passed. */ public function test_constants( $constant, $value ) { $acceptable_values = (array) $value; @@ -82,6 +82,8 @@ public function test_constants( $constant, $value ) { 'severity' => 'fail', ); } + + return null; } /** @@ -89,7 +91,7 @@ public function test_constants( $constant, $value ) { * * @since 5.2.0 * - * @return array The test results. + * @return ?array The test results, or null if the test passed. */ public function test_wp_version_check_attached() { if ( ( ! is_multisite() || is_main_site() && is_network_admin() ) @@ -104,6 +106,8 @@ public function test_wp_version_check_attached() { 'severity' => 'fail', ); } + + return null; } /** @@ -111,7 +115,7 @@ public function test_wp_version_check_attached() { * * @since 5.2.0 * - * @return array The test results. + * @return ?array The test results, or null if the test passed. */ public function test_filters_automatic_updater_disabled() { /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ @@ -125,6 +129,8 @@ public function test_filters_automatic_updater_disabled() { 'severity' => 'fail', ); } + + return null; } /** @@ -156,7 +162,7 @@ public function test_wp_automatic_updates_disabled() { * * @since 5.2.0 * - * @return array|false The test results. False if the auto-updates failed. + * @return array|false The test results. False if auto-updates didn't previously fail. */ public function test_if_failed_update() { $failed = get_site_option( 'auto_core_update_failed' ); @@ -397,7 +403,7 @@ public function test_all_files_writable() { * * @since 5.2.0 * - * @return array|false The test results. False if it isn't a development version. + * @return array|false|null The test results. False if it isn't a development version. Returns null if the test passed. */ public function test_accepts_dev_updates() { require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z @@ -428,6 +434,8 @@ public function test_accepts_dev_updates() { 'severity' => 'fail', ); } + + return null; } /** @@ -435,7 +443,7 @@ public function test_accepts_dev_updates() { * * @since 5.2.0 * - * @return array The test results. + * @return ?array The test results. Null if the test passed. */ public function test_accepts_minor_updates() { if ( defined( 'WP_AUTO_UPDATE_CORE' ) && false === WP_AUTO_UPDATE_CORE ) { @@ -460,5 +468,7 @@ public function test_accepts_minor_updates() { 'severity' => 'fail', ); } + + return null; } }