Make WordPress Core


Ignore:
Timestamp:
01/03/2026 06:15:57 AM (4 months ago)
Author:
westonruter
Message:

Code Modernization: Update tests to use null coalescing operator in place of isset() in ternaries.

Developed as a subset of https://github.com/WordPress/wordpress-develop/pull/10654

Follow-up to [61404], [61403].

See #58874, #63430.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/mock-fs.php

    r56548 r61424  
    4747        );
    4848        $this->cache  = array(); // Used by find_folder() and friends.
    49         $this->cwd    = isset( $this->fs_map[ $home_dir ] ) ? $this->fs_map[ $home_dir ] : '/';
     49        $this->cwd    = $this->fs_map[ $home_dir ] ?? '/';
    5050        $this->setfs( $paths );
    5151    }
     
    8080     */
    8181    private function locate_node( $path ) {
    82         return isset( $this->fs_map[ $path ] ) ? $this->fs_map[ $path ] : false;
     82        return $this->fs_map[ $path ] ?? false;
    8383    }
    8484
Note: See TracChangeset for help on using the changeset viewer.