Make WordPress Core


Ignore:
Timestamp:
10/17/2020 04:24:35 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Use explicit visibility for class property declarations.

Using var or only static to declare a class property is PHP 4 code.

This updates the codebase to use explicit visibility modifiers introduced in PHP 5.

Props jrf.
Fixes #51557. See #22234.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r49072 r49184  
    6262     * @var bool
    6363     */
    64     var $show_errors = false;
     64    public $show_errors = false;
    6565
    6666    /**
     
    7070     * @var bool
    7171     */
    72     var $suppress_errors = false;
     72    public $suppress_errors = false;
    7373
    7474    /**
     
    102102     * @var int
    103103     */
    104     var $rows_affected = 0;
     104    public $rows_affected = 0;
    105105
    106106    /**
     
    118118     * @var string
    119119     */
    120     var $last_query;
     120    public $last_query;
    121121
    122122    /**
     
    126126     * @var array|null
    127127     */
    128     var $last_result;
     128    public $last_result;
    129129
    130130    /**
     
    199199     * }
    200200     */
    201     var $queries;
     201    public $queries;
    202202
    203203    /**
     
    235235     * @var bool
    236236     */
    237     var $ready = false;
     237    public $ready = false;
    238238
    239239    /**
     
    260260     * @var array
    261261     */
    262     var $tables = array(
     262    public $tables = array(
    263263        'posts',
    264264        'comments',
     
    282282     * @var array
    283283     */
    284     var $old_tables = array( 'categories', 'post2cat', 'link2cat' );
     284    public $old_tables = array( 'categories', 'post2cat', 'link2cat' );
    285285
    286286    /**
     
    291291     * @var array
    292292     */
    293     var $global_tables = array( 'users', 'usermeta' );
     293    public $global_tables = array( 'users', 'usermeta' );
    294294
    295295    /**
     
    300300     * @var array
    301301     */
    302     var $ms_global_tables = array(
     302    public $ms_global_tables = array(
    303303        'blogs',
    304304        'blogmeta',
Note: See TracChangeset for help on using the changeset viewer.