Make WordPress Core


Ignore:
Timestamp:
08/09/2022 11:32:01 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename the $file parameter to $path in some WP_Filesystem_* methods.

This aims to bring more clarity to the code, and applies to methods where the path can be a file or a directory:

  • WP_Filesystem_*::exists()
  • WP_Filesystem_*::is_writable()

Follow-up to [6779], [25560].

See #55647.

File:
1 edited

Legend:

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

    r53014 r53872  
    664664     * @abstract
    665665     *
    666      * @param string $file Path to file or directory.
    667      * @return bool Whether $file exists or not.
    668      */
    669     public function exists( $file ) {
     666     * @param string $path Path to file or directory.
     667     * @return bool Whether $path exists or not.
     668     */
     669    public function exists( $path ) {
    670670        return false;
    671671    }
     
    716716     * @abstract
    717717     *
    718      * @param string $file Path to file or directory.
    719      * @return bool Whether $file is writable.
    720      */
    721     public function is_writable( $file ) {
     718     * @param string $path Path to file or directory.
     719     * @return bool Whether $path is writable.
     720     */
     721    public function is_writable( $path ) {
    722722        return false;
    723723    }
Note: See TracChangeset for help on using the changeset viewer.