Skip to content

Commit

Permalink
PHP Deprecation: Fix creation of dynamic property. (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soean authored Jul 13, 2023
1 parent 5c14109 commit ab52304
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Comment_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class Comment_Command extends CommandWithDBObject {
'comment_author_email',
];

private $fetcher;

public function __construct() {
$this->fetcher = new CommentFetcher();
}
Expand Down
2 changes: 2 additions & 0 deletions src/Post_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class Post_Command extends CommandWithDBObject {
'post_status',
];

private $fetcher;

public function __construct() {
$this->fetcher = new PostFetcher();
}
Expand Down
2 changes: 2 additions & 0 deletions src/Post_Term_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
class Post_Term_Command extends CommandWithTerms {
protected $obj_type = 'post';

private $fetcher;

public function __construct() {
$this->fetcher = new PostFetcher();
}
Expand Down
2 changes: 2 additions & 0 deletions src/Site_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class Site_Command extends CommandWithDBObject {
protected $obj_type = 'site';
protected $obj_id_key = 'blog_id';

private $fetcher;

public function __construct() {
$this->fetcher = new SiteFetcher();
}
Expand Down
1 change: 1 addition & 0 deletions src/User_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class User_Command extends CommandWithDBObject {
private $cap_fields = [
'name',
];
private $fetcher;

public function __construct() {
$this->fetcher = new UserFetcher();
Expand Down
2 changes: 2 additions & 0 deletions src/User_Meta_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
class User_Meta_Command extends CommandWithMeta {
protected $meta_type = 'user';

private $fetcher;

public function __construct() {
$this->fetcher = new UserFetcher();
}
Expand Down

0 comments on commit ab52304

Please sign in to comment.