Real stubs this time
This commit is contained in:
parent
df30ff2318
commit
8d72eee723
@ -31,5 +31,10 @@
|
||||
<referencedClass name="Doctrine\DBAL\Schema\Table" />
|
||||
</errorLevel>
|
||||
</UndefinedDocblockClass>
|
||||
<InvalidReturnType>
|
||||
<errorLevel type="suppress">
|
||||
<directory name="stubs" />
|
||||
</errorLevel>
|
||||
</InvalidReturnType>
|
||||
</issueHandlers>
|
||||
</psalm>
|
||||
|
@ -17,28 +17,75 @@ namespace OCA\GPodderSync\Core\EpisodeAction;
|
||||
* id: int
|
||||
* }
|
||||
*/
|
||||
interface EpisodeAction
|
||||
class EpisodeAction
|
||||
{
|
||||
public function getPodcast(): string;
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPodcast()
|
||||
{
|
||||
}
|
||||
|
||||
public function getEpisode(): string;
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEpisode()
|
||||
{
|
||||
}
|
||||
|
||||
public function getAction(): string;
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAction()
|
||||
{
|
||||
}
|
||||
|
||||
public function getTimestamp(): string;
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTimestamp()
|
||||
{
|
||||
}
|
||||
|
||||
public function getStarted(): int;
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getStarted()
|
||||
{
|
||||
}
|
||||
|
||||
public function getPosition(): int;
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPosition()
|
||||
{
|
||||
}
|
||||
|
||||
public function getTotal(): int;
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTotal()
|
||||
{
|
||||
}
|
||||
|
||||
public function getGuid(): ?string;
|
||||
/**
|
||||
* @return ?string
|
||||
*/
|
||||
public function getGuid()
|
||||
{
|
||||
}
|
||||
|
||||
public function getId(): int;
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EpisodeActionType
|
||||
*/
|
||||
public function toArray(): array;
|
||||
public function toArray()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,12 +4,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\EpisodeAction;
|
||||
|
||||
interface EpisodeActionReader
|
||||
class EpisodeActionReader
|
||||
{
|
||||
/**
|
||||
* @param array $episodeActionsArray []
|
||||
* @return EpisodeAction[]
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function fromArray(array $episodeActionsArray): array;
|
||||
public function fromArray(array $episodeActionsArray)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\EpisodeAction;
|
||||
|
||||
interface EpisodeActionSaver
|
||||
class EpisodeActionSaver
|
||||
{
|
||||
public function saveEpisodeActions(array $episodeActionsArray, string $userId): array;
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function saveEpisodeActions(array $episodeActionsArray, string $userId)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -13,17 +13,23 @@ namespace OCA\GPodderSync\Core\PodcastData;
|
||||
* play: int
|
||||
* }
|
||||
*/
|
||||
interface PodcastActionCounts extends \JsonSerializable
|
||||
class PodcastActionCounts implements \JsonSerializable
|
||||
{
|
||||
public function incrementAction(string $action): void;
|
||||
public function incrementAction(string $action): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PodcastActionCountsType
|
||||
*/
|
||||
public function toArray(): array;
|
||||
public function toArray()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PodcastActionCountsType
|
||||
*/
|
||||
public function jsonSerialize(): array;
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -15,43 +15,88 @@ namespace OCA\GPodderSync\Core\PodcastData;
|
||||
* imageBlob: ?string
|
||||
* }
|
||||
*/
|
||||
interface PodcastData extends \JsonSerializable
|
||||
class PodcastData implements \JsonSerializable
|
||||
{
|
||||
public function __toString(): string;
|
||||
|
||||
/**
|
||||
* @return PodcastData
|
||||
* @throws \Exception if the XML data could not be parsed
|
||||
*/
|
||||
public static function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null): PodcastData;
|
||||
public static function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null)
|
||||
{
|
||||
}
|
||||
|
||||
public function getTitle(): ?string;
|
||||
/**
|
||||
* @return ?string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
}
|
||||
|
||||
public function getAuthor(): ?string;
|
||||
/**
|
||||
* @return ?string
|
||||
*/
|
||||
public function getAuthor()
|
||||
{
|
||||
}
|
||||
|
||||
public function getLink(): ?string;
|
||||
/**
|
||||
* @return ?string
|
||||
*/
|
||||
public function getLink()
|
||||
{
|
||||
}
|
||||
|
||||
public function getDescription(): ?string;
|
||||
/**
|
||||
* @return ?string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
}
|
||||
|
||||
public function getImageUrl(): ?string;
|
||||
/**
|
||||
* @return ?string
|
||||
*/
|
||||
public function getImageUrl()
|
||||
{
|
||||
}
|
||||
|
||||
public function getFetchedAtUnix(): ?int;
|
||||
/**
|
||||
* @return ?int
|
||||
*/
|
||||
public function getFetchedAtUnix()
|
||||
{
|
||||
}
|
||||
|
||||
public function getImageBlob(): ?string;
|
||||
/**
|
||||
* @return ?string
|
||||
*/
|
||||
public function getImageBlob()
|
||||
{
|
||||
}
|
||||
|
||||
public function setImageBlob(?string $blob): void;
|
||||
public function setImageBlob(?string $blob): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PodcastDataType
|
||||
*/
|
||||
public function toArray(): array;
|
||||
public function toArray()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PodcastDataType
|
||||
*/
|
||||
public function jsonSerialize(): array;
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PodcastDataType $data
|
||||
* @return PodcastData
|
||||
*/
|
||||
public static function fromArray(array $data): PodcastData;
|
||||
public static function fromArray(array $data)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,13 +4,33 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\PodcastData;
|
||||
|
||||
interface PodcastDataReader
|
||||
class PodcastDataReader
|
||||
{
|
||||
public function getCachedOrFetchPodcastData(string $url, string $userId): ?PodcastData;
|
||||
/**
|
||||
* @return ?PodcastData
|
||||
*/
|
||||
public function getCachedOrFetchPodcastData(string $url, string $userId)
|
||||
{
|
||||
}
|
||||
|
||||
public function fetchPodcastData(string $url, string $userId): ?PodcastData;
|
||||
/**
|
||||
* @return ?PodcastData
|
||||
*/
|
||||
public function fetchPodcastData(string $url, string $userId)
|
||||
{
|
||||
}
|
||||
|
||||
public function tryGetCachedPodcastData(string $url): ?PodcastData;
|
||||
/**
|
||||
* @return ?PodcastData
|
||||
*/
|
||||
public function tryGetCachedPodcastData(string $url)
|
||||
{
|
||||
}
|
||||
|
||||
public function trySetCachedPodcastData(string $url, PodcastData $data): bool;
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function trySetCachedPodcastData(string $url, PodcastData $data)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -11,23 +11,44 @@ namespace OCA\GPodderSync\Core\PodcastData;
|
||||
* actionCounts: PodcastActionCounts
|
||||
* }
|
||||
*/
|
||||
interface PodcastMetrics extends \JsonSerializable
|
||||
class PodcastMetrics implements \JsonSerializable
|
||||
{
|
||||
public function getUrl(): string;
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
}
|
||||
|
||||
public function getActionCounts(): PodcastActionCounts;
|
||||
/**
|
||||
* @return PodcastActionCounts
|
||||
*/
|
||||
public function getActionCounts()
|
||||
{
|
||||
}
|
||||
|
||||
public function getListenedSeconds(): int;
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getListenedSeconds()
|
||||
{
|
||||
}
|
||||
|
||||
public function addListenedSeconds(int $seconds): void;
|
||||
public function addListenedSeconds(int $seconds): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PodcastMetricsType
|
||||
*/
|
||||
public function toArray(): array;
|
||||
public function toArray()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PodcastMetricsType
|
||||
*/
|
||||
public function jsonSerialize(): array;
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,10 +4,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\PodcastData;
|
||||
|
||||
interface PodcastMetricsReader
|
||||
class PodcastMetricsReader
|
||||
{
|
||||
/**
|
||||
* @return PodcastMetrics[]
|
||||
*/
|
||||
public function metrics(string $userId): array;
|
||||
public function metrics(string $userId)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,11 +4,19 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\SubscriptionChange;
|
||||
|
||||
interface SubscriptionChange
|
||||
class SubscriptionChange
|
||||
{
|
||||
public function __toString(): string;
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isSubscribed()
|
||||
{
|
||||
}
|
||||
|
||||
public function isSubscribed(): bool;
|
||||
|
||||
public function getUrl(): string;
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,10 +4,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\SubscriptionChange;
|
||||
|
||||
interface SubscriptionChangeRequestParser
|
||||
class SubscriptionChangeRequestParser
|
||||
{
|
||||
/**
|
||||
* @return SubscriptionChange[]
|
||||
*/
|
||||
public function createSubscriptionChangeList(array $urlsSubscribed, array $urlsUnsubscribed): array;
|
||||
public function createSubscriptionChangeList(array $urlsSubscribed, array $urlsUnsubscribed)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\SubscriptionChange;
|
||||
|
||||
interface SubscriptionChangeSaver
|
||||
class SubscriptionChangeSaver
|
||||
{
|
||||
public function saveSubscriptionChanges(array $urlsSubscribed, array $urlsUnsubscribed, string $userId): void;
|
||||
public function saveSubscriptionChanges(array $urlsSubscribed, array $urlsUnsubscribed, string $userId): void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -4,10 +4,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Core\SubscriptionChange;
|
||||
|
||||
interface SubscriptionChangesReader
|
||||
class SubscriptionChangesReader
|
||||
{
|
||||
/**
|
||||
* @return SubscriptionChange[]
|
||||
*/
|
||||
public static function mapToSubscriptionsChanges(array $urls, bool $subscribed): array;
|
||||
public static function mapToSubscriptionsChanges(array $urls, bool $subscribed)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user