Make WordPress Core

Changeset 31125


Ignore:
Timestamp:
01/10/2015 06:12:25 AM (10 years ago)
Author:
wonderboymusic
Message:

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.

Location:
trunk/src/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-background.php

    r31116 r31125  
    5454     * @param callback $admin_header_callback
    5555     * @param callback $admin_image_div_callback Optional custom image div output callback.
    56      * @return Custom_Background
    5756     */
    5857    public function __construct($admin_header_callback = '', $admin_image_div_callback = '') {
  • trunk/src/wp-admin/custom-header.php

    r31116 r31125  
    7272     * @param callback $admin_header_callback
    7373     * @param callback $admin_image_div_callback Optional custom image div output callback.
    74      * @return Custom_Image_Header
    7574     */
    7675    public function __construct($admin_header_callback, $admin_image_div_callback = '') {
  • trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php

    r30978 r31125  
    2727        if ( ! extension_loaded('ftp') ) {
    2828            $this->errors->add('no_ftp_ext', __('The ftp PHP extension is not available'));
    29             return false;
     29            return;
    3030        }
    3131
  • trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php

    r30978 r31125  
    4949        if ( ! extension_loaded('ssh2') ) {
    5050            $this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available'));
    51             return false;
     51            return;
    5252        }
    5353        if ( !function_exists('stream_get_contents') ) {
    5454            $this->errors->add('ssh2_php_requirement', __('The ssh2 PHP extension is available, however, we require the PHP5 function <code>stream_get_contents()</code>'));
    55             return false;
     55            return;
    5656        }
    5757
  • trunk/src/wp-admin/includes/class-wp-importer.php

    r31090 r31125  
    77     * Class Constructor
    88     *
    9      * @return void
    109     */
    1110    public function __construct() {}
Note: See TracChangeset for help on using the changeset viewer.