Make WordPress Core


Ignore:
Timestamp:
10/18/2021 05:51:17 PM (3 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add public visibility to methods in src directory.

This commit adds the public visibility keyword to each method which did not have an explicit visibility keyword.

Why public?

With no visibility previously declared, these methods are implicitly public and available for use. Changing them to anything else would be a backwards-compatibility break.

Props costdev, jrf.
See #54177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php

    r51661 r51919  
    157157     * @return array|false The test results. False if the auto-updates failed.
    158158     */
    159     function test_if_failed_update() {
     159    public function test_if_failed_update() {
    160160        $failed = get_site_option( 'auto_core_update_failed' );
    161161
     
    273273     * @return array The test results.
    274274     */
    275     function test_check_wp_filesystem_method() {
     275    public function test_check_wp_filesystem_method() {
    276276        // Make sure the `request_filesystem_credentials()` function is available during our REST API call.
    277277        if ( ! function_exists( 'request_filesystem_credentials' ) ) {
     
    307307     * @return array|false The test results. False if they're not writeable.
    308308     */
    309     function test_all_files_writable() {
     309    public function test_all_files_writable() {
    310310        global $wp_filesystem;
    311311
     
    392392     * @return array|false The test results. False if it isn't a development version.
    393393     */
    394     function test_accepts_dev_updates() {
     394    public function test_accepts_dev_updates() {
    395395        require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z
    396396        // Only for dev versions.
     
    430430     * @return array The test results.
    431431     */
    432     function test_accepts_minor_updates() {
     432    public function test_accepts_minor_updates() {
    433433        if ( defined( 'WP_AUTO_UPDATE_CORE' ) && false === WP_AUTO_UPDATE_CORE ) {
    434434            return array(
Note: See TracChangeset for help on using the changeset viewer.