diff --git a/psalm.xml b/psalm.xml
index 70602d3..e55d59b 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -31,5 +31,10 @@
+
+
+
+
+
diff --git a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php
index 0029ed4..655dcd5 100644
--- a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php
+++ b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php
@@ -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()
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php
index 403a071..2a2df04 100644
--- a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php
+++ b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php
@@ -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)
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php
index b0da7a6..843922d 100644
--- a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php
+++ b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php
@@ -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)
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastActionCounts.php b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastActionCounts.php
index 5a261f0..47eec74 100644
--- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastActionCounts.php
+++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastActionCounts.php
@@ -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
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php
index db27f8c..1bfefe2 100644
--- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php
+++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php
@@ -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)
+ {
+ }
/**
- * @throws \Exception if the XML data could not be parsed
+ * @return ?string
*/
- public static function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null): PodcastData;
+ public function getTitle()
+ {
+ }
- public function getTitle(): ?string;
+ /**
+ * @return ?string
+ */
+ public function getAuthor()
+ {
+ }
- public function getAuthor(): ?string;
+ /**
+ * @return ?string
+ */
+ public function getLink()
+ {
+ }
- public function getLink(): ?string;
+ /**
+ * @return ?string
+ */
+ public function getDescription()
+ {
+ }
- public function getDescription(): ?string;
+ /**
+ * @return ?string
+ */
+ public function getImageUrl()
+ {
+ }
- public function getImageUrl(): ?string;
+ /**
+ * @return ?int
+ */
+ public function getFetchedAtUnix()
+ {
+ }
- public function getFetchedAtUnix(): ?int;
+ /**
+ * @return ?string
+ */
+ public function getImageBlob()
+ {
+ }
- public function getImageBlob(): ?string;
-
- 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
+ * @param PodcastDataType $data
+ * @return PodcastData
*/
- public static function fromArray(array $data): PodcastData;
+ public static function fromArray(array $data)
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastDataReader.php b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastDataReader.php
index 06f6dbf..7b536c1 100644
--- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastDataReader.php
+++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastDataReader.php
@@ -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)
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetrics.php b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetrics.php
index db2ded6..ce7e0c9 100644
--- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetrics.php
+++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetrics.php
@@ -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
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php
index 0cceba1..212282d 100644
--- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php
+++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php
@@ -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)
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php
index 9a9d480..7ef7f85 100644
--- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php
+++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php
@@ -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()
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php
index f41edde..eef272f 100644
--- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php
+++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php
@@ -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)
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeSaver.php b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeSaver.php
index 7720d92..a258073 100644
--- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeSaver.php
+++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeSaver.php
@@ -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
+ {
+ }
}
diff --git a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangesReader.php b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangesReader.php
index 4b833ad..e0ee4f5 100644
--- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangesReader.php
+++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangesReader.php
@@ -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)
+ {
+ }
}