mirror of
https://git.crystalyx.net/Xefir/repod.git
synced 2024-12-27 09:14:56 +01:00
49 lines
841 B
PHP
49 lines
841 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\GPodderSync\Core\PodcastData;
|
|
|
|
/**
|
|
* @psalm-type PodcastMetricsType = array{
|
|
* url: string,
|
|
* listenedSeconds: int,
|
|
* actionCounts: PodcastActionCounts
|
|
* }
|
|
*/
|
|
class PodcastMetrics implements \JsonSerializable
|
|
{
|
|
public function __construct(
|
|
private string $url,
|
|
private int $listenedSeconds = 0,
|
|
private ?PodcastActionCounts $actionCounts = null
|
|
) {}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getUrl() {}
|
|
|
|
/**
|
|
* @return PodcastActionCounts
|
|
*/
|
|
public function getActionCounts() {}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getListenedSeconds() {}
|
|
|
|
public function addListenedSeconds(int $seconds): void {}
|
|
|
|
/**
|
|
* @return PodcastMetricsType
|
|
*/
|
|
public function toArray() {}
|
|
|
|
/**
|
|
* @return PodcastMetricsType
|
|
*/
|
|
public function jsonSerialize(): mixed {}
|
|
}
|