Make WordPress Core

Changeset 31126


Ignore:
Timestamp:
01/10/2015 06:53:48 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. Constructors do not have meaningful return values, anything that is returned from here is discarded.

See #30799.

Location:
trunk/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    r30978 r31126  
    2626        // Check if possible to use ftp functions.
    2727        if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
    28             return false;
     28            return;
    2929        }
    3030        $this->ftp = new ftp();
  • trunk/src/wp-includes/cache.php

    r30681 r31126  
    677677     *
    678678     * @since 2.0.8
    679      * @return null|WP_Object_Cache If cache is disabled, returns null.
    680679     */
    681680    public function __construct() {
  • trunk/src/wp-includes/class-http.php

    r31090 r31126  
    19621962        } else {
    19631963            if ( !isset( $data['name'] ) )
    1964                 return false;
     1964                return;
    19651965
    19661966            // Set properties based directly on parameters.
  • trunk/src/wp-includes/class-wp-ajax-response.php

    r29454 r31126  
    2323     *
    2424     * @param string|array $args Optional. Will be passed to add() method.
    25      * @return WP_Ajax_Response
    2625     */
    2726    public function __construct( $args = '' ) {
  • trunk/src/wp-includes/class-wp-customize-panel.php

    r31083 r31126  
    155155
    156156        $this->sections = array(); // Users cannot customize the $sections array.
    157 
    158         return $this;
    159157    }
    160158
  • trunk/src/wp-includes/class-wp-customize-section.php

    r31083 r31126  
    164164
    165165        $this->controls = array(); // Users cannot customize the $controls array.
    166 
    167         return $this;
    168166    }
    169167
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r31083 r31126  
    7474     *                                      theme mod or option name.
    7575     * @param array                $args    Setting arguments.
    76      * @return WP_Customize_Setting $setting
    7776     */
    7877    public function __construct( $manager, $id, $args = array() ) {
     
    10099        if ( $this->sanitize_js_callback )
    101100            add_filter( "customize_sanitize_js_{$this->id}", $this->sanitize_js_callback, 10, 2 );
    102 
    103         return $this;
    104101    }
    105102
  • trunk/src/wp-includes/class-wp-error.php

    r30681 r31126  
    5454     * @param string $message Error message
    5555     * @param mixed $data Optional. Error data.
    56      * @return WP_Error
    5756     */
    5857    public function __construct( $code = '', $message = '', $data = '' ) {
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r31092 r31126  
    4242     *
    4343     * @since 1.5.0
    44      *
    45      * @return wp_xmlrpc_server
    4644     */
    4745    public function __construct() {
     
    30973095     * @since 2.7.0
    30983096     *
    3099      * @param array $args. Contains:
     3097     * @param array $args Contains:
    31003098     *  - blog_id (unused)
    31013099     *  - username
  • trunk/src/wp-includes/locale.php

    r31078 r31126  
    319319     * @since 2.1.0
    320320     *
    321      * @return WP_Locale
    322321     */
    323322    function __construct() {
  • trunk/src/wp-includes/query.php

    r31090 r31126  
    39403940     *
    39413941     * @param string $query URL query string.
    3942      * @return WP_Query
    39433942     */
    39443943    public function __construct($query = '') {
     
    41734172     *
    41744173     * @param mixed $taxonomy Optional. Taxonomy slug or slugs.
    4175      * @param mixed $term. Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
     4174     * @param mixed $term    Optional. Term ID, name, slug or array of Term IDs, names, and slugs.
    41764175     * @return bool
    41774176     */
  • trunk/src/wp-includes/rewrite.php

    r31104 r31126  
    21722172     * @access public
    21732173     *
    2174      * @return WP_Rewrite
    21752174     */
    21762175    public function __construct() {
  • trunk/src/wp-includes/user.php

    r31090 r31126  
    487487     *
    488488     * @param null|string|array $args Optional. The query variables.
    489      * @return WP_User_Query
    490489     */
    491490    public function __construct( $query = null ) {
Note: See TracChangeset for help on using the changeset viewer.