Skip to content

Commit d117c42

Browse files
authored
Merge pull request #271 from level-level/fix/php-8.2-deprecation-warnings-in-v0.4.-
Fix/php 8.2 deprecation warnings in v0.4.
2 parents 98fe894 + 72ec8ed commit d117c42

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

clarkson-core.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
*/
2222
class Clarkson_Core {
2323

24+
/**
25+
* @var Autoloader
26+
*/
27+
public $autoloader;
28+
2429
/**
2530
* Initializes all neccessery objects. Is automatically called on 'init'.
2631
*

wordpress-objects/Clarkson_Object.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ class Clarkson_Object implements \JsonSerializable {
3131
*/
3232
protected static $posts;
3333

34+
/**
35+
* @var string
36+
*/
37+
public $_content;
38+
3439
/**
3540
* Clarkson_Object constructor.
3641
*
@@ -643,8 +648,9 @@ public function has_term( $term ) {
643648
* If you want something else, then just overwrite it in your own WordPress object.
644649
*
645650
* We can't just return $this->_post, because these values will only return raw unfiltered data.
651+
* @return array<string,mixed>
646652
*/
647-
public function jsonSerialize() {
653+
public function jsonSerialize(): array {
648654
$data['id'] = $this->get_id();
649655
$data['link'] = $this->get_permalink();
650656
$data['slug'] = $this->get_post_name();

0 commit comments

Comments
 (0)