From cb85e15f069814f9a0c8a81ef910270fc4b1f040 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 10 Jan 2015 06:12:25 +0000 Subject: [PATCH] Adding a `@return` annotation to constructors is generally not recommended as a constructor does not have a meaningful return value - anything that is returned is discarded. See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31125 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/custom-background.php | 1 - src/wp-admin/custom-header.php | 1 - src/wp-admin/includes/class-wp-filesystem-ftpext.php | 2 +- src/wp-admin/includes/class-wp-filesystem-ssh2.php | 4 ++-- src/wp-admin/includes/class-wp-importer.php | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/custom-background.php b/src/wp-admin/custom-background.php index f2eca8507d..0c515c22f9 100644 --- a/src/wp-admin/custom-background.php +++ b/src/wp-admin/custom-background.php @@ -53,7 +53,6 @@ class Custom_Background { * @since 3.0.0 * @param callback $admin_header_callback * @param callback $admin_image_div_callback Optional custom image div output callback. - * @return Custom_Background */ public function __construct($admin_header_callback = '', $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; diff --git a/src/wp-admin/custom-header.php b/src/wp-admin/custom-header.php index 7ca5dc21c2..623a1fad29 100644 --- a/src/wp-admin/custom-header.php +++ b/src/wp-admin/custom-header.php @@ -71,7 +71,6 @@ class Custom_Image_Header { * @since 2.1.0 * @param callback $admin_header_callback * @param callback $admin_image_div_callback Optional custom image div output callback. - * @return Custom_Image_Header */ public function __construct($admin_header_callback, $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php index 79bf0bff71..7a46eeab48 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/src/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -26,7 +26,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { // Check if possible to use ftp functions. if ( ! extension_loaded('ftp') ) { $this->errors->add('no_ftp_ext', __('The ftp PHP extension is not available')); - return false; + return; } // This Class uses the timeout on a per-connection basis, Others use it on a per-action basis. diff --git a/src/wp-admin/includes/class-wp-filesystem-ssh2.php b/src/wp-admin/includes/class-wp-filesystem-ssh2.php index 10872a5830..54ed2b9e4a 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/src/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -48,11 +48,11 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { //Check if possible to use ssh2 functions. if ( ! extension_loaded('ssh2') ) { $this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available')); - return false; + return; } if ( !function_exists('stream_get_contents') ) { $this->errors->add('ssh2_php_requirement', __('The ssh2 PHP extension is available, however, we require the PHP5 function stream_get_contents()')); - return false; + return; } // Set defaults: diff --git a/src/wp-admin/includes/class-wp-importer.php b/src/wp-admin/includes/class-wp-importer.php index 0831993da3..17ffaa3a59 100644 --- a/src/wp-admin/includes/class-wp-importer.php +++ b/src/wp-admin/includes/class-wp-importer.php @@ -6,7 +6,6 @@ class WP_Importer { /** * Class Constructor * - * @return void */ public function __construct() {}