2023-08-02 10:13:16 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\GPodderSync\Core\PodcastData;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @psalm-type PodcastMetricsType = array{
|
|
|
|
* url: string,
|
|
|
|
* listenedSeconds: int,
|
|
|
|
* actionCounts: PodcastActionCounts
|
|
|
|
* }
|
|
|
|
*/
|
2023-08-03 22:23:59 +00:00
|
|
|
class PodcastMetrics implements \JsonSerializable
|
2023-08-02 10:13:16 +00:00
|
|
|
{
|
2023-08-22 17:41:17 +00:00
|
|
|
public function __construct(
|
|
|
|
private string $url,
|
|
|
|
private int $listenedSeconds = 0,
|
|
|
|
private ?PodcastActionCounts $actionCounts = null
|
2023-12-23 16:25:20 +00:00
|
|
|
) {}
|
2023-08-22 17:41:17 +00:00
|
|
|
|
2023-08-03 22:23:59 +00:00
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
2023-12-23 16:25:20 +00:00
|
|
|
public function getUrl() {}
|
2023-08-02 10:13:16 +00:00
|
|
|
|
2023-08-03 22:23:59 +00:00
|
|
|
/**
|
|
|
|
* @return PodcastActionCounts
|
|
|
|
*/
|
2023-12-23 16:25:20 +00:00
|
|
|
public function getActionCounts() {}
|
2023-08-02 10:13:16 +00:00
|
|
|
|
2023-08-03 22:23:59 +00:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
2023-12-23 16:25:20 +00:00
|
|
|
public function getListenedSeconds() {}
|
2023-08-02 10:13:16 +00:00
|
|
|
|
2023-12-23 16:25:20 +00:00
|
|
|
public function addListenedSeconds(int $seconds): void {}
|
2023-08-02 10:13:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return PodcastMetricsType
|
|
|
|
*/
|
2023-12-23 16:25:20 +00:00
|
|
|
public function toArray() {}
|
2023-08-02 10:13:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return PodcastMetricsType
|
|
|
|
*/
|
2023-12-23 16:25:20 +00:00
|
|
|
public function jsonSerialize(): mixed {}
|
2023-08-02 10:13:16 +00:00
|
|
|
}
|