Make WordPress Core


Ignore:
Timestamp:
05/29/2015 08:16:22 PM (9 years ago)
Author:
wonderboymusic
Message:

Add missing doc blocks to wp-admin/includes/*.
Fix some egregious uses of tabbing.
Some functions can simply return apply_filters(...) instead of setting a variable that is immediately returned.

See #32444.

File:
1 edited

Legend:

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

    r31815 r32654  
    2121    public $ftp;
    2222
    23     public function __construct($opt = '') {
     23    /**
     24     *
     25     * @param array $opt
     26     */
     27    public function __construct( $opt  = '' ) {
    2428        $this->method = 'ftpsockets';
    2529        $this->errors = new WP_Error();
     
    5357    }
    5458
     59    /**
     60     *
     61     * @return bool
     62     */
    5563    public function connect() {
    5664        if ( ! $this->ftp )
     
    227235    }
    228236    /**
     237     * @param string   $source
     238     * @param string   $destination
     239     * @param bool     $overwrite
     240     * @param int|bool $mode
     241     * @return bool
     242     */
     243    public function copy($source, $destination, $overwrite = false, $mode = false) {
     244        if ( ! $overwrite && $this->exists($destination) )
     245            return false;
     246
     247        $content = $this->get_contents($source);
     248        if ( false === $content )
     249            return false;
     250
     251        return $this->put_contents($destination, $content, $mode);
     252    }
     253    /**
    229254     * @param string $source
    230255     * @param string $destination
    231      * @param bool $overwrite
    232      * @param int|bool $mode
    233      * @return bool
    234      */
    235     public function copy($source, $destination, $overwrite = false, $mode = false) {
    236         if ( ! $overwrite && $this->exists($destination) )
    237             return false;
    238 
    239         $content = $this->get_contents($source);
    240         if ( false === $content )
    241             return false;
    242 
    243         return $this->put_contents($destination, $content, $mode);
    244     }
    245     /**
    246      * @param string $source
    247      * @param string $destination
    248      * @param bool $overwrite
     256     * @param bool   $overwrite
    249257     * @return bool
    250258     */
     
    254262    /**
    255263     * @param string $file
    256      * @param bool $recursive
     264     * @param bool   $recursive
    257265     * @param string $type
    258266     * @return bool
     
    360368    /**
    361369     * @param string $path
    362      * @param mixed $chmod
    363      * @param mixed $chown
    364      * @param mixed $chgrp
     370     * @param mixed  $chmod
     371     * @param mixed  $chown
     372     * @param mixed  $chgrp
    365373     * @return bool
    366374     */
     
    388396    /**
    389397     * @param string $path
    390      * @param bool $include_hidden
    391      * @param bool $recursive
     398     * @param bool   $include_hidden
     399     * @param bool   $recursive
    392400     * @return bool|array
    393401     */
Note: See TracChangeset for help on using the changeset viewer.