nextcloud-gpodder/lib/Db/SubscriptionChange/SubscriptionChangeEntity.php
Jonathan Flueren 33c5a28250 Define return value of overriding jsonSerialize()
Threw DEPRECATED warnings on php8.x systems
2022-11-08 21:11:51 +01:00

30 lines
589 B
PHP

<?php
declare(strict_types=1);
namespace OCA\GPodderSync\Db\SubscriptionChange;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
class SubscriptionChangeEntity extends Entity implements JsonSerializable {
protected $url;
protected $subscribed;
protected $updated;
protected $userId;
public function __construct() {
$this->addType('id','integer');
$this->addType('subscribed','boolean');
}
public function jsonSerialize(): array {
return [
'id' => $this->id,
'url' => $this->url,
'subscribed' => $this->subscribed,
'updated' => $this->updated,
];
}
}