From 8fe993c06fdff6f9c6c1f502244cb4db79408f4c Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 8 Nov 2023 16:58:31 +0100 Subject: fix: Remove ITaskTypeWithId Signed-off-by: Marcel Klehr --- lib/public/TextProcessing/IProvider.php | 2 +- lib/public/TextProcessing/IProviderWithId.php | 3 ++- lib/public/TextProcessing/ITaskTypeWithId.php | 37 --------------------------- lib/public/TextProcessing/Task.php | 4 +-- 4 files changed, 5 insertions(+), 41 deletions(-) delete mode 100644 lib/public/TextProcessing/ITaskTypeWithId.php (limited to 'lib/public/TextProcessing') diff --git a/lib/public/TextProcessing/IProvider.php b/lib/public/TextProcessing/IProvider.php index 01c17f4bfbf..6132e60b493 100644 --- a/lib/public/TextProcessing/IProvider.php +++ b/lib/public/TextProcessing/IProvider.php @@ -56,7 +56,7 @@ interface IProvider { * provider handles * * @since 27.1.0 - * @return class-string|string + * @return class-string */ public function getTaskType(): string; } diff --git a/lib/public/TextProcessing/IProviderWithId.php b/lib/public/TextProcessing/IProviderWithId.php index 6723168988e..f7b6ecfda0e 100644 --- a/lib/public/TextProcessing/IProviderWithId.php +++ b/lib/public/TextProcessing/IProviderWithId.php @@ -27,7 +27,8 @@ namespace OCP\TextProcessing; /** * @since 28.0.0 - * @extends IProvider + * @extends IProvider + * @template T of ITaskType */ interface IProviderWithId extends IProvider { diff --git a/lib/public/TextProcessing/ITaskTypeWithId.php b/lib/public/TextProcessing/ITaskTypeWithId.php deleted file mode 100644 index b86b831f266..00000000000 --- a/lib/public/TextProcessing/ITaskTypeWithId.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * @author Marcel Klehr - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -namespace OCP\TextProcessing; - -/** - * @since 28.0.0 - */ -interface ITaskTypeWithId { - /** - * The id of this provider - * @since 28.0.0 - */ - public function getId(): string; -} diff --git a/lib/public/TextProcessing/Task.php b/lib/public/TextProcessing/Task.php index 52a7637bd7c..446e414cb04 100644 --- a/lib/public/TextProcessing/Task.php +++ b/lib/public/TextProcessing/Task.php @@ -29,8 +29,8 @@ namespace OCP\TextProcessing; * This is a text processing task * @since 27.1.0 * @psalm-template T of ITaskType - * @psalm-template S as class-string | string - * @psalm-template P as IProvider | IProvider + * @psalm-template S as class-string + * @psalm-template P as IProvider */ final class Task implements \JsonSerializable { protected ?int $id = null; -- cgit v1.2.3