From cee5aa84f02de18084067a2e33e8d252f2362be4 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 20 Oct 2023 14:56:24 +0200 Subject: fix(Text2Image): Fix psalm errors Signed-off-by: Marcel Klehr --- lib/public/AppFramework/Bootstrap/IRegistrationContext.php | 11 +++++++++++ lib/public/TextToImage/IManager.php | 1 + 2 files changed, 12 insertions(+) (limited to 'lib') diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index c34cec38eb1..b956c308c01 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -38,6 +38,7 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Template\ICustomTemplateProvider; use OCP\IContainer; use OCP\TextProcessing\IProvider as ITextProcessingProvider; +use OCP\TextToImage\IProvider as ITextToImageProvider; use OCP\Notification\INotifier; use OCP\Preview\IProviderV2; use OCP\SpeechToText\ISpeechToTextProvider; @@ -230,6 +231,16 @@ interface IRegistrationContext { */ public function registerTextProcessingProvider(string $providerClass): void; + /** + * Register a custom text2image provider class that provides the possibility to generate images + * through the OCP\TextToImage APIs + * + * @param string $providerClass + * @psalm-param class-string $providerClass + * @since 27.1.0 + */ + public function registerTextToImageProvider(string $providerClass): void; + /** * Register a custom template provider class that is able to inject custom templates * in addition to the user defined ones diff --git a/lib/public/TextToImage/IManager.php b/lib/public/TextToImage/IManager.php index cd97312779c..5afaecd37bc 100644 --- a/lib/public/TextToImage/IManager.php +++ b/lib/public/TextToImage/IManager.php @@ -66,6 +66,7 @@ interface IManager { * @throws Exception if there was a problem inserting the task into the database * @throws PreConditionNotMetException if no provider is registered * @throws RuntimeException If the task run fail + * @since 28.0.0 */ public function runOrScheduleTask(Task $task) : void; -- cgit v1.2.3