Make WordPress Core

Ticket #51557: 51557-property-visibility.patch

File 51557-property-visibility.patch, 32.2 KB (added by jrf, 6 years ago)

Fixes all known instances of this issue

  • src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php

    From 4ae2f4a83a963611aa939ebeed4dde15058cd51a Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sat, 17 Oct 2020 16:33:33 +0200
    Subject: [PATCH] Modernize: use explicit visibility for property declarations
    
    Using `var` or just and only `static` to declare a class property is PHP 4 code. PHP 5 introduced visibility modifiers.
    
    This updates the code base to use explicit visibility modifier for properties.
    
    No review has been done on what the visibility of the properties _should_ be as a property without visibility defaults to `public` and changing that to a more closed visibility would be a BC-break.
    ---
     .../class-twentynineteen-svg-icons.php        |  6 +--
     src/wp-includes/class-wp-rewrite.php          | 42 +++++++++----------
     src/wp-includes/pomo/entry.php                | 18 ++++----
     src/wp-includes/pomo/mo.php                   |  2 +-
     src/wp-includes/pomo/po.php                   |  2 +-
     src/wp-includes/pomo/streams.php              |  6 +--
     src/wp-includes/pomo/translations.php         |  8 ++--
     src/wp-includes/wp-db.php                     | 22 +++++-----
     .../class-wp-unittest-generator-sequence.php  |  2 +-
     tests/phpunit/includes/mock-mailer.php        |  2 +-
     tests/phpunit/includes/testcase-canonical.php | 14 +++----
     tests/phpunit/includes/utils.php              |  8 ++--
     tests/phpunit/tests/admin/includesScreen.php  |  2 +-
     tests/phpunit/tests/cache.php                 |  2 +-
     tests/phpunit/tests/feed/atom.php             |  6 +--
     tests/phpunit/tests/feed/rss2.php             |  8 ++--
     .../phpunit/tests/functions/wpListFilter.php  |  4 +-
     tests/phpunit/tests/http/base.php             |  4 +-
     tests/phpunit/tests/http/curl.php             |  2 +-
     tests/phpunit/tests/http/streams.php          |  2 +-
     tests/phpunit/tests/image/header.php          |  2 +-
     tests/phpunit/tests/link/getDashboardUrl.php  |  2 +-
     .../tests/multisite/wpMSSitesListTable.php    |  2 +-
     tests/phpunit/tests/query/commentCount.php    |  4 +-
     tests/phpunit/tests/query/date.php            |  2 +-
     tests/phpunit/tests/query/results.php         | 22 +++++-----
     tests/phpunit/tests/query/stickies.php        |  2 +-
     tests/phpunit/tests/theme/customHeader.php    |  2 +-
     tests/phpunit/tests/upload.php                |  2 +-
     tests/phpunit/tests/user/countUserPosts.php   |  4 +-
     .../tests/user/getActiveBlogForUser.php       |  2 +-
     tests/phpunit/tests/user/listAuthors.php      |  8 ++--
     tests/phpunit/tests/walker.php                |  4 +-
     tests/phpunit/tests/xmlrpc/wp/getComments.php |  2 +-
     .../phpunit/tests/xmlrpc/wp/getMediaItem.php  |  4 +-
     tests/phpunit/tests/xmlrpc/wp/getPost.php     |  8 ++--
     tests/phpunit/tests/xmlrpc/wp/getPostType.php |  4 +-
     .../tests/xmlrpc/wp/restoreRevision.php       |  4 +-
     38 files changed, 121 insertions(+), 121 deletions(-)
    
    diff --git a/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php b/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php
    index 01a35c0309..aa2ebf27bb 100644
    a b class TwentyNineteen_SVG_Icons { 
    7070         *
    7171         * @var array
    7272         */
    73         static $ui_icons = array(
     73        public static $ui_icons = array(
    7474                'link'                     => /* material-design – link */ '
    7575<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    7676    <path d="M0 0h24v24H0z" fill="none"></path>
    class TwentyNineteen_SVG_Icons { 
    178178         *
    179179         * @var array
    180180         */
    181         static $social_icons_map = array(
     181        public static $social_icons_map = array(
    182182                'amazon'      => array(
    183183                        'amazon.com',
    184184                        'amazon.cn',
    class TwentyNineteen_SVG_Icons { 
    237237         *
    238238         * @var array
    239239         */
    240         static $social_icons = array(
     240        public static $social_icons = array(
    241241                '500px'       => '
    242242<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    243243        <path d="M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"></path>
  • src/wp-includes/class-wp-rewrite.php

    diff --git a/src/wp-includes/class-wp-rewrite.php b/src/wp-includes/class-wp-rewrite.php
    index 729ddf3663..6b5fc05fc8 100644
    a b class WP_Rewrite { 
    4545         * @since 1.5.0
    4646         * @var string
    4747         */
    48         var $author_base = 'author';
     48        public $author_base = 'author';
    4949
    5050        /**
    5151         * Permalink structure for author archives.
    class WP_Rewrite { 
    5353         * @since 1.5.0
    5454         * @var string
    5555         */
    56         var $author_structure;
     56        public $author_structure;
    5757
    5858        /**
    5959         * Permalink structure for date archives.
    class WP_Rewrite { 
    6161         * @since 1.5.0
    6262         * @var string
    6363         */
    64         var $date_structure;
     64        public $date_structure;
    6565
    6666        /**
    6767         * Permalink structure for pages.
    class WP_Rewrite { 
    6969         * @since 1.5.0
    7070         * @var string
    7171         */
    72         var $page_structure;
     72        public $page_structure;
    7373
    7474        /**
    7575         * Base of the search permalink structure (example.com/$search_base/query).
    class WP_Rewrite { 
    7777         * @since 1.5.0
    7878         * @var string
    7979         */
    80         var $search_base = 'search';
     80        public $search_base = 'search';
    8181
    8282        /**
    8383         * Permalink structure for searches.
    class WP_Rewrite { 
    8585         * @since 1.5.0
    8686         * @var string
    8787         */
    88         var $search_structure;
     88        public $search_structure;
    8989
    9090        /**
    9191         * Comments permalink base.
    class WP_Rewrite { 
    9393         * @since 1.5.0
    9494         * @var string
    9595         */
    96         var $comments_base = 'comments';
     96        public $comments_base = 'comments';
    9797
    9898        /**
    9999         * Pagination permalink base.
    class WP_Rewrite { 
    109109         * @since 4.2.0
    110110         * @var string
    111111         */
    112         var $comments_pagination_base = 'comment-page';
     112        public $comments_pagination_base = 'comment-page';
    113113
    114114        /**
    115115         * Feed permalink base.
    class WP_Rewrite { 
    117117         * @since 1.5.0
    118118         * @var string
    119119         */
    120         var $feed_base = 'feed';
     120        public $feed_base = 'feed';
    121121
    122122        /**
    123123         * Comments feed permalink structure.
    class WP_Rewrite { 
    125125         * @since 1.5.0
    126126         * @var string
    127127         */
    128         var $comment_feed_structure;
     128        public $comment_feed_structure;
    129129
    130130        /**
    131131         * Feed request permalink structure.
    class WP_Rewrite { 
    133133         * @since 1.5.0
    134134         * @var string
    135135         */
    136         var $feed_structure;
     136        public $feed_structure;
    137137
    138138        /**
    139139         * The static portion of the post permalink structure.
    class WP_Rewrite { 
    178178         * @since 1.5.0
    179179         * @var string
    180180         */
    181         var $matches = '';
     181        public $matches = '';
    182182
    183183        /**
    184184         * Rewrite rules to match against the request to find the redirect or query.
    class WP_Rewrite { 
    186186         * @since 1.5.0
    187187         * @var array
    188188         */
    189         var $rules;
     189        public $rules;
    190190
    191191        /**
    192192         * Additional rules added external to the rewrite class.
    class WP_Rewrite { 
    196196         * @since 2.1.0
    197197         * @var array
    198198         */
    199         var $extra_rules = array();
     199        public $extra_rules = array();
    200200
    201201        /**
    202202         * Additional rules that belong at the beginning to match first.
    class WP_Rewrite { 
    206206         * @since 2.3.0
    207207         * @var array
    208208         */
    209         var $extra_rules_top = array();
     209        public $extra_rules_top = array();
    210210
    211211        /**
    212212         * Rules that don't redirect to WordPress' index.php.
    class WP_Rewrite { 
    217217         * @since 2.1.0
    218218         * @var array
    219219         */
    220         var $non_wp_rules = array();
     220        public $non_wp_rules = array();
    221221
    222222        /**
    223223         * Extra permalink structures, e.g. categories, added by add_permastruct().
    class WP_Rewrite { 
    225225         * @since 2.1.0
    226226         * @var array
    227227         */
    228         var $extra_permastructs = array();
     228        public $extra_permastructs = array();
    229229
    230230        /**
    231231         * Endpoints (like /trackback/) added by add_rewrite_endpoint().
    class WP_Rewrite { 
    233233         * @since 2.1.0
    234234         * @var array
    235235         */
    236         var $endpoints;
     236        public $endpoints;
    237237
    238238        /**
    239239         * Whether to write every mod_rewrite rule for WordPress into the .htaccess file.
    class WP_Rewrite { 
    277277         * @since 1.5.0
    278278         * @var array
    279279         */
    280         var $rewritecode = array(
     280        public $rewritecode = array(
    281281                '%year%',
    282282                '%monthnum%',
    283283                '%day%',
    class WP_Rewrite { 
    298298         * @since 1.5.0
    299299         * @var array
    300300         */
    301         var $rewritereplace = array(
     301        public $rewritereplace = array(
    302302                '([0-9]{4})',
    303303                '([0-9]{1,2})',
    304304                '([0-9]{1,2})',
    class WP_Rewrite { 
    318318         * @since 1.5.0
    319319         * @var array
    320320         */
    321         var $queryreplace = array(
     321        public $queryreplace = array(
    322322                'year=',
    323323                'monthnum=',
    324324                'day=',
  • src/wp-includes/pomo/entry.php

    diff --git a/src/wp-includes/pomo/entry.php b/src/wp-includes/pomo/entry.php
    index a1293d4fa5..f0226dbc54 100644
    a b if ( ! class_exists( 'Translation_Entry', false ) ) : 
    1818                 *
    1919                 * @var boolean
    2020                 */
    21                 var $is_plural = false;
     21                public $is_plural = false;
    2222
    23                 var $context             = null;
    24                 var $singular            = null;
    25                 var $plural              = null;
    26                 var $translations        = array();
    27                 var $translator_comments = '';
    28                 var $extracted_comments  = '';
    29                 var $references          = array();
    30                 var $flags               = array();
     23                public $context             = null;
     24                public $singular            = null;
     25                public $plural              = null;
     26                public $translations        = array();
     27                public $translator_comments = '';
     28                public $extracted_comments  = '';
     29                public $references          = array();
     30                public $flags               = array();
    3131
    3232                /**
    3333                 * @param array $args associative array, support following keys:
  • src/wp-includes/pomo/mo.php

    diff --git a/src/wp-includes/pomo/mo.php b/src/wp-includes/pomo/mo.php
    index b4f829fdef..7e3bf81014 100644
    a b require_once __DIR__ . '/streams.php'; 
    1313if ( ! class_exists( 'MO', false ) ) :
    1414        class MO extends Gettext_Translations {
    1515
    16                 var $_nplurals = 2;
     16                public $_nplurals = 2;
    1717
    1818                /**
    1919                 * Loaded MO file.
  • src/wp-includes/pomo/po.php

    diff --git a/src/wp-includes/pomo/po.php b/src/wp-includes/pomo/po.php
    index 5030afb5df..b2a605a3ec 100644
    a b ini_set( 'auto_detect_line_endings', 1 ); 
    2121if ( ! class_exists( 'PO', false ) ) :
    2222        class PO extends Gettext_Translations {
    2323
    24                 var $comments_before_headers = '';
     24                public $comments_before_headers = '';
    2525
    2626                /**
    2727                 * Exports headers to a PO entry
  • src/wp-includes/pomo/streams.php

    diff --git a/src/wp-includes/pomo/streams.php b/src/wp-includes/pomo/streams.php
    index 89e13a8f4b..3978d65791 100644
    a b  
    1111if ( ! class_exists( 'POMO_Reader', false ) ) :
    1212        class POMO_Reader {
    1313
    14                 var $endian = 'little';
    15                 var $_post  = '';
     14                public $endian = 'little';
     15                public $_post  = '';
    1616
    1717                /**
    1818                 * PHP5 constructor.
    if ( ! class_exists( 'POMO_StringReader', false ) ) : 
    226226         */
    227227        class POMO_StringReader extends POMO_Reader {
    228228
    229                 var $_str = '';
     229                public $_str = '';
    230230
    231231                /**
    232232                 * PHP5 constructor.
  • src/wp-includes/pomo/translations.php

    diff --git a/src/wp-includes/pomo/translations.php b/src/wp-includes/pomo/translations.php
    index d99037eaed..d93c6528f4 100644
    a b require_once __DIR__ . '/entry.php'; 
    1212
    1313if ( ! class_exists( 'Translations', false ) ) :
    1414        class Translations {
    15                 var $entries = array();
    16                 var $headers = array();
     15                public $entries = array();
     16                public $headers = array();
    1717
    1818                /**
    1919                 * Add entry to the PO structure
    if ( ! class_exists( 'NOOP_Translations', false ) ) : 
    301301         * Provides the same interface as Translations, but doesn't do anything
    302302         */
    303303        class NOOP_Translations {
    304                 var $entries = array();
    305                 var $headers = array();
     304                public $entries = array();
     305                public $headers = array();
    306306
    307307                function add_entry( $entry ) {
    308308                        return true;
  • src/wp-includes/wp-db.php

    diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
    index 80c117c1a0..5eabf8a540 100644
    a b class wpdb { 
    6161         * @since 0.71
    6262         * @var bool
    6363         */
    64         var $show_errors = false;
     64        public $show_errors = false;
    6565
    6666        /**
    6767         * Whether to suppress errors during the DB bootstrapping. Default false.
    class wpdb { 
    6969         * @since 2.5.0
    7070         * @var bool
    7171         */
    72         var $suppress_errors = false;
     72        public $suppress_errors = false;
    7373
    7474        /**
    7575         * The error encountered during the last query.
    class wpdb { 
    101101         * @since 0.71
    102102         * @var int
    103103         */
    104         var $rows_affected = 0;
     104        public $rows_affected = 0;
    105105
    106106        /**
    107107         * The ID generated for an AUTO_INCREMENT column by the last query (usually INSERT).
    class wpdb { 
    117117         * @since 0.71
    118118         * @var string
    119119         */
    120         var $last_query;
     120        public $last_query;
    121121
    122122        /**
    123123         * Results of the last query.
    class wpdb { 
    125125         * @since 0.71
    126126         * @var array|null
    127127         */
    128         var $last_result;
     128        public $last_result;
    129129
    130130        /**
    131131         * MySQL result, which is either a resource or boolean.
    class wpdb { 
    198198         *     }
    199199         * }
    200200         */
    201         var $queries;
     201        public $queries;
    202202
    203203        /**
    204204         * The number of times to retry reconnecting before dying. Default 5.
    class wpdb { 
    234234         * @since 2.3.2
    235235         * @var bool
    236236         */
    237         var $ready = false;
     237        public $ready = false;
    238238
    239239        /**
    240240         * Blog ID.
    class wpdb { 
    259259         * @see wpdb::tables()
    260260         * @var array
    261261         */
    262         var $tables = array(
     262        public $tables = array(
    263263                'posts',
    264264                'comments',
    265265                'links',
    class wpdb { 
    281281         * @see wpdb::tables()
    282282         * @var array
    283283         */
    284         var $old_tables = array( 'categories', 'post2cat', 'link2cat' );
     284        public $old_tables = array( 'categories', 'post2cat', 'link2cat' );
    285285
    286286        /**
    287287         * List of WordPress global tables.
    class wpdb { 
    290290         * @see wpdb::tables()
    291291         * @var array
    292292         */
    293         var $global_tables = array( 'users', 'usermeta' );
     293        public $global_tables = array( 'users', 'usermeta' );
    294294
    295295        /**
    296296         * List of Multisite global tables.
    class wpdb { 
    299299         * @see wpdb::tables()
    300300         * @var array
    301301         */
    302         var $ms_global_tables = array(
     302        public $ms_global_tables = array(
    303303                'blogs',
    304304                'blogmeta',
    305305                'signups',
  • tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php

    diff --git a/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php b/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php
    index 5c0778f3d4..9391dd8bf7 100644
    a b  
    11<?php
    22
    33class WP_UnitTest_Generator_Sequence {
    4         static $incr = -1;
     4        public static $incr = -1;
    55        public $next;
    66        public $template_string;
    77
  • tests/phpunit/includes/mock-mailer.php

    diff --git a/tests/phpunit/includes/mock-mailer.php b/tests/phpunit/includes/mock-mailer.php
    index e5e3d98fa2..d02d2efc69 100644
    a b require_once ABSPATH . 'wp-includes/PHPMailer/PHPMailer.php'; 
    33require_once ABSPATH . 'wp-includes/PHPMailer/Exception.php';
    44
    55class MockPHPMailer extends PHPMailer\PHPMailer\PHPMailer {
    6         var $mock_sent = array();
     6        public $mock_sent = array();
    77
    88        function preSend() {
    99                $this->Encoding = '8bit';
  • tests/phpunit/includes/testcase-canonical.php

    diff --git a/tests/phpunit/includes/testcase-canonical.php b/tests/phpunit/includes/testcase-canonical.php
    index 655c0b0612..3866145589 100644
    a b  
    11<?php
    22
    33class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
    4         static $old_current_user;
    5         static $author_id;
    6         static $post_ids    = array();
    7         static $comment_ids = array();
    8         static $term_ids    = array();
    9         static $terms       = array();
    10         static $old_options = array();
     4        public static $old_current_user;
     5        public static $author_id;
     6        public static $post_ids    = array();
     7        public static $comment_ids = array();
     8        public static $term_ids    = array();
     9        public static $terms       = array();
     10        public static $old_options = array();
    1111
    1212        /**
    1313         * This can be defined in a subclass of this class which contains its own data() method.
  • tests/phpunit/includes/utils.php

    diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php
    index 08b7c0f5d9..1546d4e973 100644
    a b function strip_ws( $txt ) { 
    3838 * add_action( 'foo', array( &$ma, 'action' ) );
    3939 */
    4040class MockAction {
    41         var $events;
    42         var $debug;
     41        public $events;
     42        public $debug;
    4343
    4444        /**
    4545         * PHP5 constructor.
    class MockAction { 
    184184// Convert valid XML to an array tree structure.
    185185// Kinda lame, but it works with a default PHP 4 installation.
    186186class TestXMLParser {
    187         var $xml;
    188         var $data = array();
     187        public $xml;
     188        public $data = array();
    189189
    190190        /**
    191191         * PHP5 constructor.
  • tests/phpunit/tests/admin/includesScreen.php

    diff --git a/tests/phpunit/tests/admin/includesScreen.php b/tests/phpunit/tests/admin/includesScreen.php
    index c482ae3711..ade4294c6b 100644
    a b  
    55 * @group adminScreen
    66 */
    77class Tests_Admin_includesScreen extends WP_UnitTestCase {
    8         var $core_screens = array(
     8        public $core_screens = array(
    99                'index.php'                            => array(
    1010                        'base'            => 'dashboard',
    1111                        'id'              => 'dashboard',
  • tests/phpunit/tests/cache.php

    diff --git a/tests/phpunit/tests/cache.php b/tests/phpunit/tests/cache.php
    index 16206208da..b8c11b09df 100644
    a b  
    44 * @group cache
    55 */
    66class Tests_Cache extends WP_UnitTestCase {
    7         var $cache = null;
     7        public $cache = null;
    88
    99        function setUp() {
    1010                parent::setUp();
  • tests/phpunit/tests/feed/atom.php

    diff --git a/tests/phpunit/tests/feed/atom.php b/tests/phpunit/tests/feed/atom.php
    index cc9a30af72..e8d308014c 100644
    a b  
    99 * @group feed
    1010 */
    1111class Tests_Feeds_Atom extends WP_UnitTestCase {
    12         static $user_id;
    13         static $posts;
    14         static $category;
     12        public static $user_id;
     13        public static $posts;
     14        public static $category;
    1515
    1616        /**
    1717         * Setup a new user and attribute some posts.
  • tests/phpunit/tests/feed/rss2.php

    diff --git a/tests/phpunit/tests/feed/rss2.php b/tests/phpunit/tests/feed/rss2.php
    index 8eda26e9d2..16fd4fe198 100644
    a b  
    99 * @group feed
    1010 */
    1111class Tests_Feeds_RSS2 extends WP_UnitTestCase {
    12         static $user_id;
    13         static $posts;
    14         static $category;
    15         static $post_date;
     12        public static $user_id;
     13        public static $posts;
     14        public static $category;
     15        public static $post_date;
    1616
    1717        /**
    1818         * Setup a new user and attribute some posts.
  • tests/phpunit/tests/functions/wpListFilter.php

    diff --git a/tests/phpunit/tests/functions/wpListFilter.php b/tests/phpunit/tests/functions/wpListFilter.php
    index 24d43b504d..64abe90c44 100644
    a b  
    88 * @covers ::wp_list_pluck
    99 */
    1010class Tests_Functions_wpListFilter extends WP_UnitTestCase {
    11         var $object_list = array();
    12         var $array_list  = array();
     11        public $object_list = array();
     12        public $array_list  = array();
    1313
    1414        function setUp() {
    1515                parent::setUp();
  • tests/phpunit/tests/http/base.php

    diff --git a/tests/phpunit/tests/http/base.php b/tests/phpunit/tests/http/base.php
    index 0919f91ac0..c7cce5bad2 100644
    a b  
    1212 */
    1313abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
    1414        // You can use your own version of data/WPHTTP-testcase-redirection-script.php here.
    15         var $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php';
    16         var $file_stream_url    = 'http://s.w.org/screenshots/3.9/dashboard.png';
     15        public $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php';
     16        public $file_stream_url    = 'http://s.w.org/screenshots/3.9/dashboard.png';
    1717
    1818        protected $http_request_args;
    1919
  • tests/phpunit/tests/http/curl.php

    diff --git a/tests/phpunit/tests/http/curl.php b/tests/phpunit/tests/http/curl.php
    index 271e6dd698..ceee347aa8 100644
    a b require_once __DIR__ . '/base.php'; 
    77 * @group external-http
    88 */
    99class Tests_HTTP_curl extends WP_HTTP_UnitTestCase {
    10         var $transport = 'curl';
     10        public $transport = 'curl';
    1111
    1212        /**
    1313         * @ticket 39783
  • tests/phpunit/tests/http/streams.php

    diff --git a/tests/phpunit/tests/http/streams.php b/tests/phpunit/tests/http/streams.php
    index 61fcc11925..9ae1b30512 100644
    a b require_once __DIR__ . '/base.php'; 
    77 * @group external-http
    88 */
    99class Tests_HTTP_streams extends WP_HTTP_UnitTestCase {
    10         var $transport = 'streams';
     10        public $transport = 'streams';
    1111}
  • tests/phpunit/tests/image/header.php

    diff --git a/tests/phpunit/tests/image/header.php b/tests/phpunit/tests/image/header.php
    index d378dddb2d..897c68e5fa 100644
    a b require_once ABSPATH . 'wp-admin/includes/class-custom-image-header.php'; 
    66 * @group header
    77 */
    88class Tests_Image_Header extends WP_UnitTestCase {
    9         var $custom_image_header;
     9        public $custom_image_header;
    1010
    1111        function setUp() {
    1212                parent::setUp();
  • tests/phpunit/tests/link/getDashboardUrl.php

    diff --git a/tests/phpunit/tests/link/getDashboardUrl.php b/tests/phpunit/tests/link/getDashboardUrl.php
    index be051b3027..9495c6f546 100644
    a b  
    44 * @group link
    55 */
    66class Tests_Link_GetDashboardUrl extends WP_UnitTestCase {
    7         static $user_id = false;
     7        public static $user_id = false;
    88
    99        public static function wpSetUpBeforeClass( $factory ) {
    1010                self::$user_id = $factory->user->create( array( 'role' => 'administrator' ) );
  • tests/phpunit/tests/multisite/wpMSSitesListTable.php

    diff --git a/tests/phpunit/tests/multisite/wpMSSitesListTable.php b/tests/phpunit/tests/multisite/wpMSSitesListTable.php
    index a49369cca5..b9dc73cdb0 100644
    a b if ( is_multisite() ) : 
    1212                /**
    1313                 * @var WP_MS_Sites_List_Table
    1414                 */
    15                 var $table = false;
     15                public $table = false;
    1616
    1717                function setUp() {
    1818                        parent::setUp();
  • tests/phpunit/tests/query/commentCount.php

    diff --git a/tests/phpunit/tests/query/commentCount.php b/tests/phpunit/tests/query/commentCount.php
    index fd72740f7b..29d3f3cad6 100644
    a b  
    33 * @group query
    44 */
    55class Tests_Query_CommentCount extends WP_UnitTestCase {
    6         static $post_ids = array();
     6        public static $post_ids = array();
    77        public $q;
    8         static $post_type = 'page'; // Can be anything.
     8        public static $post_type = 'page'; // Can be anything.
    99
    1010        public function setUp() {
    1111                parent::setUp();
  • tests/phpunit/tests/query/date.php

    diff --git a/tests/phpunit/tests/query/date.php b/tests/phpunit/tests/query/date.php
    index 0372233cfb..17d5dc5aa3 100644
    a b class Tests_Query_Date extends WP_UnitTestCase { 
    1010
    1111        public $q;
    1212
    13         static $post_ids = array();
     13        public static $post_ids = array();
    1414
    1515        public static function wpSetUpBeforeClass( $factory ) {
    1616                // Be careful modifying this. Tests are coded to expect this exact sample data.
  • tests/phpunit/tests/query/results.php

    diff --git a/tests/phpunit/tests/query/results.php b/tests/phpunit/tests/query/results.php
    index eb801249ab..e284e3417b 100644
    a b  
    99class Tests_Query_Results extends WP_UnitTestCase {
    1010        protected $q;
    1111
    12         static $cat_ids  = array();
    13         static $tag_ids  = array();
    14         static $post_ids = array();
    15 
    16         static $parent_one;
    17         static $parent_two;
    18         static $parent_three;
    19         static $child_one;
    20         static $child_two;
    21         static $child_three;
    22         static $child_four;
     12        public static $cat_ids  = array();
     13        public static $tag_ids  = array();
     14        public static $post_ids = array();
     15
     16        public static $parent_one;
     17        public static $parent_two;
     18        public static $parent_three;
     19        public static $child_one;
     20        public static $child_two;
     21        public static $child_three;
     22        public static $child_four;
    2323
    2424        public static function wpSetUpBeforeClass( $factory ) {
    2525                $cat_a           = $factory->term->create(
  • tests/phpunit/tests/query/stickies.php

    diff --git a/tests/phpunit/tests/query/stickies.php b/tests/phpunit/tests/query/stickies.php
    index 2dc285ade3..306c1a6876 100644
    a b  
    66 * @group query
    77 */
    88class Tests_Query_Stickies extends WP_UnitTestCase {
    9         static $posts = array();
     9        public static $posts = array();
    1010
    1111        public static function wpSetUpBeforeClass( $factory ) {
    1212                // Set post times to get a reliable order.
  • tests/phpunit/tests/theme/customHeader.php

    diff --git a/tests/phpunit/tests/theme/customHeader.php b/tests/phpunit/tests/theme/customHeader.php
    index 229b85dec1..34a30496e9 100644
    a b  
    44 */
    55class Tests_Theme_Custom_Header extends WP_UnitTestCase {
    66
    7         static $post;
     7        public static $post;
    88
    99        protected static $header_video_id;
    1010
  • tests/phpunit/tests/upload.php

    diff --git a/tests/phpunit/tests/upload.php b/tests/phpunit/tests/upload.php
    index 8fe2f9e91d..43cd1e338a 100644
    a b  
    55 */
    66class Tests_Upload extends WP_UnitTestCase {
    77
    8         var $siteurl;
     8        public $siteurl;
    99
    1010        function setUp() {
    1111                $this->_reset_options();
  • tests/phpunit/tests/user/countUserPosts.php

    diff --git a/tests/phpunit/tests/user/countUserPosts.php b/tests/phpunit/tests/user/countUserPosts.php
    index a3ed4c305f..3ddd3b4da0 100644
    a b  
    55 * @group post
    66 */
    77class Tests_User_CountUserPosts extends WP_UnitTestCase {
    8         static $user_id;
    9         static $post_ids = array();
     8        public static $user_id;
     9        public static $post_ids = array();
    1010
    1111        public static function wpSetUpBeforeClass( $factory ) {
    1212                self::$user_id = $factory->user->create(
  • tests/phpunit/tests/user/getActiveBlogForUser.php

    diff --git a/tests/phpunit/tests/user/getActiveBlogForUser.php b/tests/phpunit/tests/user/getActiveBlogForUser.php
    index 0d13583ae0..6476e3ac63 100644
    a b if ( is_multisite() ) : 
    1010         * @group multisite
    1111         */
    1212        class Tests_Multisite_getActiveBlogForUser extends WP_UnitTestCase {
    13                 static $user_id = false;
     13                public static $user_id = false;
    1414
    1515                public static function wpSetUpBeforeClass( $factory ) {
    1616                        self::$user_id = $factory->user->create();
  • tests/phpunit/tests/user/listAuthors.php

    diff --git a/tests/phpunit/tests/user/listAuthors.php b/tests/phpunit/tests/user/listAuthors.php
    index 8908b39d0b..35c3e91211 100644
    a b  
    44 * @group user
    55 */
    66class Tests_User_ListAuthors extends WP_UnitTestCase {
    7         static $user_ids = array();
    8         static $fred_id;
    9         static $posts     = array();
    10         static $user_urls = array();
     7        public static $user_ids = array();
     8        public static $fred_id;
     9        public static $posts     = array();
     10        public static $user_urls = array();
    1111                /* Defaults
    1212                'orderby'       => 'name',
    1313                'order'         => 'ASC',
  • tests/phpunit/tests/walker.php

    diff --git a/tests/phpunit/tests/walker.php b/tests/phpunit/tests/walker.php
    index 5ab08b1579..c40db21a90 100644
    a b class Tests_Walker extends WP_UnitTestCase { 
    286286
    287287class Walker_Test extends Walker {
    288288
    289         var $tree_type = 'test';
    290         var $db_fields = array(
     289        public $tree_type = 'test';
     290        public $db_fields = array(
    291291                'parent' => 'parent',
    292292                'id'     => 'id',
    293293        );
  • tests/phpunit/tests/xmlrpc/wp/getComments.php

    diff --git a/tests/phpunit/tests/xmlrpc/wp/getComments.php b/tests/phpunit/tests/xmlrpc/wp/getComments.php
    index 07d78e0b0f..5ec958762f 100644
    a b  
    44 * @group xmlrpc
    55 */
    66class Tests_XMLRPC_wp_getComments extends WP_XMLRPC_UnitTestCase {
    7         var $post_id;
     7        public $post_id;
    88
    99        function test_invalid_username_password() {
    1010                $result = $this->myxmlrpcserver->wp_getComments( array( 1, 'username', 'password', array() ) );
  • tests/phpunit/tests/xmlrpc/wp/getMediaItem.php

    diff --git a/tests/phpunit/tests/xmlrpc/wp/getMediaItem.php b/tests/phpunit/tests/xmlrpc/wp/getMediaItem.php
    index 6312cdda44..26b2ac4aa1 100644
    a b  
    66class Tests_XMLRPC_wp_getMediaItem extends WP_XMLRPC_UnitTestCase {
    77        protected static $post_id;
    88
    9         var $attachment_data;
    10         var $attachment_id;
     9        public $attachment_data;
     10        public $attachment_id;
    1111
    1212        public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
    1313                self::$post_id = $factory->post->create();
  • tests/phpunit/tests/xmlrpc/wp/getPost.php

    diff --git a/tests/phpunit/tests/xmlrpc/wp/getPost.php b/tests/phpunit/tests/xmlrpc/wp/getPost.php
    index 30b8addf6c..6752677d97 100644
    a b  
    44 * @group xmlrpc
    55 */
    66class Tests_XMLRPC_wp_getPost extends WP_XMLRPC_UnitTestCase {
    7         var $post_data;
    8         var $post_id;
    9         var $post_date_ts;
    10         var $post_custom_field;
     7        public $post_data;
     8        public $post_id;
     9        public $post_date_ts;
     10        public $post_custom_field;
    1111
    1212        function setUp() {
    1313                parent::setUp();
  • tests/phpunit/tests/xmlrpc/wp/getPostType.php

    diff --git a/tests/phpunit/tests/xmlrpc/wp/getPostType.php b/tests/phpunit/tests/xmlrpc/wp/getPostType.php
    index 3781dc0674..cfff2320fc 100644
    a b  
    44 * @group xmlrpc
    55 */
    66class Tests_XMLRPC_wp_getPostType extends WP_XMLRPC_UnitTestCase {
    7         var $cpt_name;
    8         var $cpt_args;
     7        public $cpt_name;
     8        public $cpt_args;
    99
    1010        function setUp() {
    1111                parent::setUp();
  • tests/phpunit/tests/xmlrpc/wp/restoreRevision.php

    diff --git a/tests/phpunit/tests/xmlrpc/wp/restoreRevision.php b/tests/phpunit/tests/xmlrpc/wp/restoreRevision.php
    index b3ef2731a2..e89e1f988c 100644
    a b  
    44 * @group xmlrpc
    55 */
    66class Tests_XMLRPC_wp_restoreRevision extends WP_XMLRPC_UnitTestCase {
    7         var $post_id;
    8         var $revision_id;
     7        public $post_id;
     8        public $revision_id;
    99
    1010        function setUp() {
    1111                parent::setUp();