mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
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:
@@ -3,9 +3,9 @@
|
||||
* @group query
|
||||
*/
|
||||
class Tests_Query_CommentCount extends WP_UnitTestCase {
|
||||
static $post_ids = array();
|
||||
public static $post_ids = array();
|
||||
public $q;
|
||||
static $post_type = 'page'; // Can be anything.
|
||||
public static $post_type = 'page'; // Can be anything.
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
@@ -10,7 +10,7 @@ class Tests_Query_Date extends WP_UnitTestCase {
|
||||
|
||||
public $q;
|
||||
|
||||
static $post_ids = array();
|
||||
public static $post_ids = array();
|
||||
|
||||
public static function wpSetUpBeforeClass( $factory ) {
|
||||
// Be careful modifying this. Tests are coded to expect this exact sample data.
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
class Tests_Query_Results extends WP_UnitTestCase {
|
||||
protected $q;
|
||||
|
||||
static $cat_ids = array();
|
||||
static $tag_ids = array();
|
||||
static $post_ids = array();
|
||||
public static $cat_ids = array();
|
||||
public static $tag_ids = array();
|
||||
public static $post_ids = array();
|
||||
|
||||
static $parent_one;
|
||||
static $parent_two;
|
||||
static $parent_three;
|
||||
static $child_one;
|
||||
static $child_two;
|
||||
static $child_three;
|
||||
static $child_four;
|
||||
public static $parent_one;
|
||||
public static $parent_two;
|
||||
public static $parent_three;
|
||||
public static $child_one;
|
||||
public static $child_two;
|
||||
public static $child_three;
|
||||
public static $child_four;
|
||||
|
||||
public static function wpSetUpBeforeClass( $factory ) {
|
||||
$cat_a = $factory->term->create(
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @group query
|
||||
*/
|
||||
class Tests_Query_Stickies extends WP_UnitTestCase {
|
||||
static $posts = array();
|
||||
public static $posts = array();
|
||||
|
||||
public static function wpSetUpBeforeClass( $factory ) {
|
||||
// Set post times to get a reliable order.
|
||||
|
||||
Reference in New Issue
Block a user