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.

git-svn-id: https://develop.svn.wordpress.org/trunk@49184 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-10-17 16:24:35 +00:00
parent 5b6a20af07
commit 5bad4e7f8d
38 changed files with 120 additions and 120 deletions

View File

@@ -4,7 +4,7 @@
* @group xmlrpc
*/
class Tests_XMLRPC_wp_getComments extends WP_XMLRPC_UnitTestCase {
var $post_id;
public $post_id;
function test_invalid_username_password() {
$result = $this->myxmlrpcserver->wp_getComments( array( 1, 'username', 'password', array() ) );

View File

@@ -6,8 +6,8 @@
class Tests_XMLRPC_wp_getMediaItem extends WP_XMLRPC_UnitTestCase {
protected static $post_id;
var $attachment_data;
var $attachment_id;
public $attachment_data;
public $attachment_id;
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
self::$post_id = $factory->post->create();

View File

@@ -4,10 +4,10 @@
* @group xmlrpc
*/
class Tests_XMLRPC_wp_getPost extends WP_XMLRPC_UnitTestCase {
var $post_data;
var $post_id;
var $post_date_ts;
var $post_custom_field;
public $post_data;
public $post_id;
public $post_date_ts;
public $post_custom_field;
function setUp() {
parent::setUp();

View File

@@ -4,8 +4,8 @@
* @group xmlrpc
*/
class Tests_XMLRPC_wp_getPostType extends WP_XMLRPC_UnitTestCase {
var $cpt_name;
var $cpt_args;
public $cpt_name;
public $cpt_args;
function setUp() {
parent::setUp();

View File

@@ -4,8 +4,8 @@
* @group xmlrpc
*/
class Tests_XMLRPC_wp_restoreRevision extends WP_XMLRPC_UnitTestCase {
var $post_id;
var $revision_id;
public $post_id;
public $revision_id;
function setUp() {
parent::setUp();