RePod-Nextcloud-App/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetrics.php

49 lines
841 B
PHP
Raw Normal View History

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