From 93e4998394ba4bc8c2514edf2bf187c959015940 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 23 Dec 2023 16:25:20 +0000 Subject: [PATCH] cs fix --- lib/AppInfo/Application.php | 13 ++--- lib/Controller/EpisodesController.php | 6 +-- lib/Controller/PageController.php | 6 +-- lib/Controller/PodcastController.php | 3 +- lib/Controller/SearchController.php | 3 +- lib/Controller/ToplistController.php | 3 +- .../EpisodeAction/EpisodeActionExtraData.php | 42 +++++---------- .../EpisodeAction/EpisodeActionReader.php | 12 ++--- lib/Service/FyydService.php | 9 ++-- lib/Service/ItunesService.php | 6 +-- lib/Service/UserService.php | 15 ++---- .../Core/EpisodeAction/EpisodeAction.php | 43 ++++------------ .../EpisodeAction/EpisodeActionReader.php | 4 +- .../Core/EpisodeAction/EpisodeActionSaver.php | 7 +-- .../Core/PodcastData/PodcastActionCounts.php | 12 ++--- .../Core/PodcastData/PodcastData.php | 51 +++++-------------- .../Core/PodcastData/PodcastDataReader.php | 16 ++---- .../Core/PodcastData/PodcastMetrics.php | 27 +++------- .../Core/PodcastData/PodcastMetricsReader.php | 4 +- .../SubscriptionChange/SubscriptionChange.php | 11 ++-- .../SubscriptionChangeRequestParser.php | 8 +-- .../SubscriptionChangeSaver.php | 4 +- .../SubscriptionChangesReader.php | 4 +- .../Db/EpisodeAction/EpisodeActionEntity.php | 4 +- .../Db/EpisodeAction/EpisodeActionMapper.php | 16 ++---- .../EpisodeAction/EpisodeActionRepository.php | 20 ++------ .../Db/EpisodeAction/EpisodeActionWriter.php | 12 ++--- .../SubscriptionChangeEntity.php | 4 +- .../SubscriptionChangeMapper.php | 20 ++------ .../SubscriptionChangeRepository.php | 20 ++------ .../SubscriptionChangeWriter.php | 16 ++---- 31 files changed, 116 insertions(+), 305 deletions(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 910585e..3ab54e6 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -19,13 +19,11 @@ class Application extends App implements IBootstrap private const GPODDERSYNC_ID = 'gpoddersync'; private const GPODDERSYNC_MIN_VERSION = '3.8.1'; - public function __construct() - { + public function __construct() { parent::__construct(self::APP_ID); } - public function boot(IBootContext $context): void - { + public function boot(IBootContext $context): void { /** @psalm-suppress DeprecatedInterface */ $appContainer = $context->getAppContainer(); @@ -44,12 +42,9 @@ class Application extends App implements IBootstrap Util::connectHook('\OCP\Config', 'js', $this, 'extendJsConfig'); } - public function register(IRegistrationContext $context): void - { - } + public function register(IRegistrationContext $context): void {} - public static function extendJsConfig(array $settings): void - { + public static function extendJsConfig(array $settings): void { /** @var IAppManager $appManager */ $appManager = Server::get(IAppManager::class); diff --git a/lib/Controller/EpisodesController.php b/lib/Controller/EpisodesController.php index a4339c7..63d9d54 100644 --- a/lib/Controller/EpisodesController.php +++ b/lib/Controller/EpisodesController.php @@ -22,16 +22,14 @@ class EpisodesController extends Controller parent::__construct(Application::APP_ID, $request); } - public function list(string $url): JSONResponse - { + public function list(string $url): JSONResponse { $client = $this->clientService->newClient(); $feed = $client->get($url); return new JSONResponse($this->episodeActionReader->parseRssXml((string) $feed->getBody()), $feed->getStatusCode()); } - public function action(string $url): JSONResponse - { + public function action(string $url): JSONResponse { $action = $this->episodeActionReader->findByEpisodeUrl($url); if ($action) { diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 088782c..47390c0 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -14,8 +14,7 @@ use OCP\Util; class PageController extends Controller { - public function __construct(IRequest $request, private IConfig $config) - { + public function __construct(IRequest $request, private IConfig $config) { parent::__construct(Application::APP_ID, $request); } @@ -23,8 +22,7 @@ class PageController extends Controller * @NoAdminRequired * @NoCSRFRequired */ - public function index(): TemplateResponse - { + public function index(): TemplateResponse { Util::addScript(Application::APP_ID, 'repod-main'); $csp = new ContentSecurityPolicy(); diff --git a/lib/Controller/PodcastController.php b/lib/Controller/PodcastController.php index 9c3a00d..d7030fe 100644 --- a/lib/Controller/PodcastController.php +++ b/lib/Controller/PodcastController.php @@ -24,8 +24,7 @@ class PodcastController extends Controller parent::__construct(Application::APP_ID, $request); } - public function index(string $url): JSONResponse - { + public function index(string $url): JSONResponse { $podcast = $this->podcastDataReader->tryGetCachedPodcastData($url); if ($podcast) { diff --git a/lib/Controller/SearchController.php b/lib/Controller/SearchController.php index c3b46a5..dac90f2 100644 --- a/lib/Controller/SearchController.php +++ b/lib/Controller/SearchController.php @@ -24,8 +24,7 @@ class SearchController extends Controller parent::__construct(Application::APP_ID, $request); } - public function index(string $value): JSONResponse - { + public function index(string $value): JSONResponse { $podcasts = []; $providers = [$this->fyydService, $this->itunesService]; diff --git a/lib/Controller/ToplistController.php b/lib/Controller/ToplistController.php index df75dee..54f8992 100644 --- a/lib/Controller/ToplistController.php +++ b/lib/Controller/ToplistController.php @@ -24,8 +24,7 @@ class ToplistController extends Controller * @NoAdminRequired * @NoCSRFRequired */ - public function index(): JSONResponse - { + public function index(): JSONResponse { try { return new JSONResponse($this->fyydService->hot()); } catch (\Exception $e) { diff --git a/lib/Core/EpisodeAction/EpisodeActionExtraData.php b/lib/Core/EpisodeAction/EpisodeActionExtraData.php index ed86c8b..a1775bf 100644 --- a/lib/Core/EpisodeAction/EpisodeActionExtraData.php +++ b/lib/Core/EpisodeAction/EpisodeActionExtraData.php @@ -56,46 +56,38 @@ class EpisodeActionExtraData implements \JsonSerializable $this->episodeAction = $episodeAction; } - public function __toString(): string - { + public function __toString(): string { return $this->episodeUrl ?? '/no episodeUrl/'; } - public function getEpisodeGuid(): string - { + public function getEpisodeGuid(): string { return $this->episodeGuid; } - public function getEpisodePubDate(): ?\DateTime - { + public function getEpisodePubDate(): ?\DateTime { return $this->episodePubDate; } - public function getEpisodeFilesize(): ?int - { + public function getEpisodeFilesize(): ?int { return $this->episodeFilesize; } - public function getEpisodeDuration(): ?int - { + public function getEpisodeDuration(): ?int { return $this->episodeDuration; } - public function getEpisodeAction(): ?EpisodeAction - { + public function getEpisodeAction(): ?EpisodeAction { return $this->episodeAction; } - public function getEpisodeUrl(): ?string - { + public function getEpisodeUrl(): ?string { return $this->episodeUrl; } /** * @return EpisodeActionExtraDataType */ - public function toArray(): array - { + public function toArray(): array { return [ 'podcastName' => $this->podcastName, @@ -116,33 +108,27 @@ class EpisodeActionExtraData implements \JsonSerializable /** * @return EpisodeActionExtraDataType */ - public function jsonSerialize(): mixed - { + public function jsonSerialize(): mixed { return $this->toArray(); } - public function getPodcastName(): ?string - { + public function getPodcastName(): ?string { return $this->podcastName; } - public function getEpisodeName(): ?string - { + public function getEpisodeName(): ?string { return $this->episodeName; } - public function getEpisodeLink(): ?string - { + public function getEpisodeLink(): ?string { return $this->episodeLink; } - public function getFetchedAtUnix(): int - { + public function getFetchedAtUnix(): int { return $this->fetchedAtUnix; } - public function getEpisodeImage(): ?string - { + public function getEpisodeImage(): ?string { return $this->episodeImage; } } diff --git a/lib/Core/EpisodeAction/EpisodeActionReader.php b/lib/Core/EpisodeAction/EpisodeActionReader.php index a2bf535..0e47787 100644 --- a/lib/Core/EpisodeAction/EpisodeActionReader.php +++ b/lib/Core/EpisodeAction/EpisodeActionReader.php @@ -13,11 +13,9 @@ class EpisodeActionReader public function __construct( private EpisodeActionRepository $episodeActionRepository, private UserService $userService - ) { - } + ) {} - public function findByEpisodeUrl(string $episodeUrl): ?EpisodeAction - { + public function findByEpisodeUrl(string $episodeUrl): ?EpisodeAction { return $this->episodeActionRepository->findByEpisodeUrl($episodeUrl, $this->userService->getUserUID()); } @@ -26,8 +24,7 @@ class EpisodeActionReader * * @throws \Exception if the XML data could not be parsed */ - public function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null): array - { + public function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null): array { $episodes = []; $xml = new \SimpleXMLElement($xmlString); $channel = $xml->channel; @@ -129,8 +126,7 @@ class EpisodeActionReader /** * @param null|\SimpleXMLElement|string $value */ - private function stringOrNull($value): ?string - { + private function stringOrNull($value): ?string { if ($value) { return (string) $value; } diff --git a/lib/Service/FyydService.php b/lib/Service/FyydService.php index cfb5050..97857ba 100644 --- a/lib/Service/FyydService.php +++ b/lib/Service/FyydService.php @@ -20,11 +20,9 @@ class FyydService implements IProvider private IFactory $l10n, private IUserSession $userSession, private LoggerInterface $logger - ) { - } + ) {} - public function search(string $value): array - { + public function search(string $value): array { $podcasts = []; $client = $this->clientService->newClient(); @@ -57,8 +55,7 @@ class FyydService implements IProvider /** * @return PodcastData[] */ - public function hot(int $count = 10): array - { + public function hot(int $count = 10): array { $podcasts = []; $language = 'en'; $userLang = $this->userService->getLangCode(); diff --git a/lib/Service/ItunesService.php b/lib/Service/ItunesService.php index ad08ebc..a969b9f 100644 --- a/lib/Service/ItunesService.php +++ b/lib/Service/ItunesService.php @@ -14,11 +14,9 @@ class ItunesService implements IProvider public function __construct( private IClientService $clientService, private UserService $userService - ) { - } + ) {} - public function search(string $value): array - { + public function search(string $value): array { $podcasts = []; $client = $this->clientService->newClient(); diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index 5d53e05..d4fac42 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -12,30 +12,25 @@ class UserService public function __construct( private IFactory $l10n, private IUserSession $userSession - ) { - } + ) {} - public function getUserUID(): string - { + public function getUserUID(): string { $user = $this->userSession->getUser(); return $user ? $user->getUID() : ''; } - public function getIsoCode(): string - { + public function getIsoCode(): string { return $this->l10n->getUserLanguage($this->userSession->getUser()); } - public function getCountryCode(): string - { + public function getCountryCode(): string { $isoCodes = explode('_', $this->getIsoCode()); return isset($isoCodes[1]) ? $isoCodes[1] : 'us'; } - public function getLangCode(): string - { + public function getLangCode(): string { $isoCodes = explode('_', $this->getIsoCode()); return $isoCodes[0]; diff --git a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php index a9af0d6..f8f21c4 100644 --- a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php +++ b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeAction.php @@ -29,76 +29,55 @@ class EpisodeAction private int $total, private ?string $guid, private ?int $id - ) { - } + ) {} /** * @return string */ - public function getPodcast() - { - } + public function getPodcast() {} /** * @return string */ - public function getEpisode() - { - } + public function getEpisode() {} /** * @return string */ - public function getAction() - { - } + public function getAction() {} /** * @return string */ - public function getTimestamp() - { - } + public function getTimestamp() {} /** * @return int */ - public function getStarted() - { - } + public function getStarted() {} /** * @return int */ - public function getPosition() - { - } + public function getPosition() {} /** * @return int */ - public function getTotal() - { - } + public function getTotal() {} /** * @return ?string */ - public function getGuid() - { - } + public function getGuid() {} /** * @return int */ - public function getId() - { - } + public function getId() {} /** * @return EpisodeActionType */ - public function toArray() - { - } + public function toArray() {} } diff --git a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php index 2a2df04..de85137 100644 --- a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php +++ b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionReader.php @@ -11,7 +11,5 @@ class EpisodeActionReader * @return EpisodeAction[] * @throws \InvalidArgumentException */ - public function fromArray(array $episodeActionsArray) - { - } + public function fromArray(array $episodeActionsArray) {} } diff --git a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php index 337d641..05c4013 100644 --- a/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php +++ b/stubs/OCA/GPodderSync/Core/EpisodeAction/EpisodeActionSaver.php @@ -13,13 +13,10 @@ class EpisodeActionSaver private EpisodeActionRepository $episodeActionRepository, private EpisodeActionWriter $episodeActionWriter, private EpisodeActionReader $episodeActionReader - ) { - } + ) {} /** * @return array */ - public function saveEpisodeActions(array $episodeActionsArray, string $userId) - { - } + 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 47eec74..5c70496 100644 --- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastActionCounts.php +++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastActionCounts.php @@ -15,21 +15,15 @@ namespace OCA\GPodderSync\Core\PodcastData; */ class PodcastActionCounts implements \JsonSerializable { - public function incrementAction(string $action): void - { - } + public function incrementAction(string $action): void {} /** * @return PodcastActionCountsType */ - public function toArray() - { - } + public function toArray() {} /** * @return PodcastActionCountsType */ - public function jsonSerialize(): mixed - { - } + public function jsonSerialize(): mixed {} } diff --git a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php index 2ab8c48..6eb8dba 100644 --- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php +++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastData.php @@ -25,89 +25,64 @@ class PodcastData implements \JsonSerializable private ?string $imageUrl, private int $fetchedAtUnix, private ?string $imageBlob = null - ) { - } + ) {} /** * @return PodcastData * @throws \Exception if the XML data could not be parsed */ - public static function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null) - { - } + public static function parseRssXml(string $xmlString, ?int $fetchedAtUnix = null) {} /** * @return ?string */ - public function getTitle() - { - } + public function getTitle() {} /** * @return ?string */ - public function getAuthor() - { - } + public function getAuthor() {} /** * @return ?string */ - public function getLink() - { - } + public function getLink() {} /** * @return ?string */ - public function getDescription() - { - } + public function getDescription() {} /** * @return ?string */ - public function getImageUrl() - { - } + public function getImageUrl() {} /** * @return ?int */ - public function getFetchedAtUnix() - { - } + public function getFetchedAtUnix() {} /** * @return ?string */ - public function getImageBlob() - { - } + public function getImageBlob() {} - public function setImageBlob(?string $blob): void - { - } + public function setImageBlob(?string $blob): void {} /** * @return PodcastDataType */ - public function toArray() - { - } + public function toArray() {} /** * @return PodcastDataType */ - public function jsonSerialize(): mixed - { - } + public function jsonSerialize(): mixed {} /** * @param PodcastDataType $data * @return PodcastData */ - public static function fromArray(array $data) - { - } + 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 7b536c1..98f14ae 100644 --- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastDataReader.php +++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastDataReader.php @@ -9,28 +9,20 @@ class PodcastDataReader /** * @return ?PodcastData */ - public function getCachedOrFetchPodcastData(string $url, string $userId) - { - } + public function getCachedOrFetchPodcastData(string $url, string $userId) {} /** * @return ?PodcastData */ - public function fetchPodcastData(string $url, string $userId) - { - } + public function fetchPodcastData(string $url, string $userId) {} /** * @return ?PodcastData */ - public function tryGetCachedPodcastData(string $url) - { - } + public function tryGetCachedPodcastData(string $url) {} /** * @return bool */ - public function trySetCachedPodcastData(string $url, PodcastData $data) - { - } + 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 3481fed..4f96f34 100644 --- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetrics.php +++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetrics.php @@ -17,45 +17,32 @@ class PodcastMetrics implements \JsonSerializable private string $url, private int $listenedSeconds = 0, private ?PodcastActionCounts $actionCounts = null - ) { - } + ) {} /** * @return string */ - public function getUrl() - { - } + public function getUrl() {} /** * @return PodcastActionCounts */ - public function getActionCounts() - { - } + public function getActionCounts() {} /** * @return int */ - public function getListenedSeconds() - { - } + public function getListenedSeconds() {} - public function addListenedSeconds(int $seconds): void - { - } + public function addListenedSeconds(int $seconds): void {} /** * @return PodcastMetricsType */ - public function toArray() - { - } + public function toArray() {} /** * @return PodcastMetricsType */ - public function jsonSerialize(): mixed - { - } + public function jsonSerialize(): mixed {} } diff --git a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php index 212282d..0ea8b10 100644 --- a/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php +++ b/stubs/OCA/GPodderSync/Core/PodcastData/PodcastMetricsReader.php @@ -9,7 +9,5 @@ class PodcastMetricsReader /** * @return PodcastMetrics[] */ - public function metrics(string $userId) - { - } + public function metrics(string $userId) {} } diff --git a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php index 02857fc..9663691 100644 --- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php +++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChange.php @@ -9,20 +9,15 @@ class SubscriptionChange public function __construct( private string $url, private bool $isSubscribed - ) { - } + ) {} /** * @return bool */ - public function isSubscribed() - { - } + public function isSubscribed() {} /** * @return string */ - public function getUrl() - { - } + public function getUrl() {} } diff --git a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php index 5b83720..c2ab020 100644 --- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php +++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeRequestParser.php @@ -6,14 +6,10 @@ namespace OCA\GPodderSync\Core\SubscriptionChange; class SubscriptionChangeRequestParser { - public function __construct(private SubscriptionChangesReader $subscriptionChangeReader) - { - } + public function __construct(private SubscriptionChangesReader $subscriptionChangeReader) {} /** * @return SubscriptionChange[] */ - public function createSubscriptionChangeList(array $urlsSubscribed, array $urlsUnsubscribed) - { - } + 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 a258073..19ca05e 100644 --- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeSaver.php +++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangeSaver.php @@ -6,7 +6,5 @@ namespace OCA\GPodderSync\Core\SubscriptionChange; 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 e0ee4f5..e41768c 100644 --- a/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangesReader.php +++ b/stubs/OCA/GPodderSync/Core/SubscriptionChange/SubscriptionChangesReader.php @@ -9,7 +9,5 @@ class SubscriptionChangesReader /** * @return SubscriptionChange[] */ - public static function mapToSubscriptionsChanges(array $urls, bool $subscribed) - { - } + public static function mapToSubscriptionsChanges(array $urls, bool $subscribed) {} } diff --git a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionEntity.php b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionEntity.php index d8810c8..8339b4a 100644 --- a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionEntity.php +++ b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionEntity.php @@ -34,7 +34,5 @@ class EpisodeActionEntity extends Entity implements \JsonSerializable /** * @return EpisodeActionType[] */ - public function jsonSerialize(): mixed - { - } + public function jsonSerialize(): mixed {} } diff --git a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionMapper.php b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionMapper.php index 7ebc3dd..ca92e8f 100644 --- a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionMapper.php +++ b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionMapper.php @@ -13,29 +13,21 @@ use OCP\IDBConnection; */ class EpisodeActionMapper extends QBMapper { - public function __construct(IDBConnection $db) - { - } + public function __construct(IDBConnection $db) {} /** * @return EpisodeActionEntity[] * @throws Exception */ - public function findAll(int $sinceTimestamp, string $userId) - { - } + public function findAll(int $sinceTimestamp, string $userId) {} /** * @return ?EpisodeActionEntity */ - public function findByEpisodeUrl(string $episodeIdentifier, string $userId) - { - } + public function findByEpisodeUrl(string $episodeIdentifier, string $userId) {} /** * @return ?EpisodeActionEntity */ - public function findByGuid(string $guid, string $userId) - { - } + public function findByGuid(string $guid, string $userId) {} } diff --git a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionRepository.php b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionRepository.php index 73f4723..133e913 100644 --- a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionRepository.php +++ b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionRepository.php @@ -8,32 +8,22 @@ use OCA\GPodderSync\Core\EpisodeAction\EpisodeAction; class EpisodeActionRepository { - public function __construct(private EpisodeActionMapper $episodeActionMapper) - { - } + public function __construct(private EpisodeActionMapper $episodeActionMapper) {} /** * @return EpisodeAction[] */ - public function findAll(int $sinceEpoch, string $userId) - { - } + public function findAll(int $sinceEpoch, string $userId) {} /** * @return ?EpisodeAction */ - public function findByEpisodeUrl(string $episodeUrl, string $userId) - { - } + public function findByEpisodeUrl(string $episodeUrl, string $userId) {} /** * @return ?EpisodeAction */ - public function findByGuid(string $guid, string $userId) - { - } + public function findByGuid(string $guid, string $userId) {} - public function deleteEpisodeActionByEpisodeUrl(string $episodeUrl, string $userId): void - { - } + public function deleteEpisodeActionByEpisodeUrl(string $episodeUrl, string $userId): void {} } diff --git a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionWriter.php b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionWriter.php index d9696df..b809994 100644 --- a/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionWriter.php +++ b/stubs/OCA/GPodderSync/Db/EpisodeAction/EpisodeActionWriter.php @@ -8,23 +8,17 @@ use OCP\DB\Exception; class EpisodeActionWriter { - public function __construct(private EpisodeActionMapper $episodeActionMapper) - { - } + public function __construct(private EpisodeActionMapper $episodeActionMapper) {} /** * @return EpisodeActionEntity * @throws Exception */ - public function save(EpisodeActionEntity $episodeActionEntity) - { - } + public function save(EpisodeActionEntity $episodeActionEntity) {} /** * @return EpisodeActionEntity * @throws Exception */ - public function update(EpisodeActionEntity $episodeActionEntity) - { - } + public function update(EpisodeActionEntity $episodeActionEntity) {} } diff --git a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeEntity.php b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeEntity.php index 644a520..b2ce719 100644 --- a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeEntity.php +++ b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeEntity.php @@ -11,7 +11,5 @@ class SubscriptionChangeEntity extends Entity implements \JsonSerializable /** * @return array */ - public function jsonSerialize(): mixed - { - } + public function jsonSerialize(): mixed {} } diff --git a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeMapper.php b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeMapper.php index beaa296..412c7d8 100644 --- a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeMapper.php +++ b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeMapper.php @@ -12,32 +12,22 @@ use OCP\IDBConnection; */ class SubscriptionChangeMapper extends QBMapper { - public function __construct(IDBConnection $db) - { - } + public function __construct(IDBConnection $db) {} /** * @return SubscriptionChangeEntity[] */ - public function findAll(string $userId) - { - } + public function findAll(string $userId) {} /** * @return ?SubscriptionChangeEntity */ - public function findByUrl(string $url, string $userId) - { - } + public function findByUrl(string $url, string $userId) {} - public function remove(SubscriptionChangeEntity $subscriptionChangeEntity): void - { - } + public function remove(SubscriptionChangeEntity $subscriptionChangeEntity): void {} /** * @return SubscriptionChangeEntity[] */ - public function findAllSubscriptionState(bool $subscribed, \DateTime $sinceTimestamp, string $userId) - { - } + public function findAllSubscriptionState(bool $subscribed, \DateTime $sinceTimestamp, string $userId) {} } diff --git a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeRepository.php b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeRepository.php index 60583ee..d694dca 100644 --- a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeRepository.php +++ b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeRepository.php @@ -6,35 +6,25 @@ namespace OCA\GPodderSync\Db\SubscriptionChange; class SubscriptionChangeRepository { - public function __construct(private SubscriptionChangeMapper $subscriptionChangeMapper) - { - } + public function __construct(private SubscriptionChangeMapper $subscriptionChangeMapper) {} /** * @return SubscriptionChangeEntity[] */ - public function findAll() - { - } + public function findAll() {} /** * @return ?SubscriptionChangeEntity */ - public function findByUrl(string $episode, string $userId) - { - } + public function findByUrl(string $episode, string $userId) {} /** * @return SubscriptionChangeEntity[] */ - public function findAllSubscribed(\DateTime $sinceTimestamp, string $userId) - { - } + public function findAllSubscribed(\DateTime $sinceTimestamp, string $userId) {} /** * @return SubscriptionChangeEntity[] */ - public function findAllUnSubscribed(\DateTime $sinceTimestamp, string $userId) - { - } + public function findAllUnSubscribed(\DateTime $sinceTimestamp, string $userId) {} } diff --git a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeWriter.php b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeWriter.php index b4d72aa..1aa04f4 100644 --- a/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeWriter.php +++ b/stubs/OCA/GPodderSync/Db/SubscriptionChange/SubscriptionChangeWriter.php @@ -6,25 +6,17 @@ namespace OCA\GPodderSync\Db\SubscriptionChange; class SubscriptionChangeWriter { - public function __construct(private SubscriptionChangeMapper $subscriptionChangeMapper) - { - } + public function __construct(private SubscriptionChangeMapper $subscriptionChangeMapper) {} - public function purge(): void - { - } + public function purge(): void {} /** * @return SubscriptionChangeEntity */ - public function create(SubscriptionChangeEntity $subscriptionChangeEntity) - { - } + public function create(SubscriptionChangeEntity $subscriptionChangeEntity) {} /** * @return SubscriptionChangeEntity */ - public function update(SubscriptionChangeEntity $subscriptionChangeEntity) - { - } + public function update(SubscriptionChangeEntity $subscriptionChangeEntity) {} }