Make WordPress Core


Ignore:
Timestamp:
12/06/2014 09:23:52 PM (9 years ago)
Author:
DrewAPicture
Message:

Convert various uses of (optional) in core parameter descriptions to use the style prescribed in the inline documentation standards for PHP.

The style for marking parameters optional in inline PHP docs is: @param type $var Optional. Description. Accepts. Default., where Accepts can be omitted on a case-by-case basis.

Props coffee2code.
Fixes #30591.

File:
1 edited

Legend:

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

    r30682 r30753  
    5050     * Write a string to a file
    5151     *
    52      * @param string $file Remote path to the file where to write the data.
     52     * @param string $file     Remote path to the file where to write the data.
    5353     * @param string $contents The data to write.
    54      * @param int $mode (optional) The file permissions as octal number, usually 0644.
    55      * @return bool False upon failure.
     54     * @param int    $mode     Optional. The file permissions as octal number, usually 0644.
     55     *                         Default false.
     56     * @return bool False upon failure, true otherwise.
    5657     */
    5758    public function put_contents( $file, $contents, $mode = false ) {
     
    100101     * Changes file group
    101102     *
    102      * @param string $file Path to the file.
    103      * @param mixed $group A group name or number.
    104      * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False.
     103     * @param string $file      Path to the file.
     104     * @param mixed  $group    A group name or number.
     105     * @param bool   $recursive Optional. If set True changes file group recursively. Default false.
    105106     * @return bool Returns true on success or false on failure.
    106107     */
     
    124125     * Changes filesystem permissions
    125126     *
    126      * @param string $file Path to the file.
    127      * @param int $mode (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs.
    128      * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False.
     127     * @param string $file      Path to the file.
     128     * @param int    $mode      Optional. The permissions as octal number, usually 0644 for files,
     129     *                          0755 for dirs. Default false.
     130     * @param bool   $recursive Optional. If set True changes file group recursively. Default false.
    129131     * @return bool Returns true on success or false on failure.
    130132     */
     
    153155     * Changes file owner
    154156     *
    155      * @param string $file Path to the file.
    156      * @param mixed $owner A user name or number.
    157      * @param bool $recursive (optional) If set True changes file owner recursively. Defaults to False.
     157     * @param string $file      Path to the file.
     158     * @param mixed  $owner     A user name or number.
     159     * @param bool   $recursive Optional. If set True changes file owner recursively.
     160     *                          Default false.
    158161     * @return bool Returns true on success or false on failure.
    159162     */
Note: See TracChangeset for help on using the changeset viewer.