]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(ros): Copy better typing information from Notifications app bugfix/noid/copy-better-typing-from-notifications-app 49192/head
authorJoas Schilling <coding@schilljs.com>
Mon, 11 Nov 2024 06:27:00 +0000 (07:27 +0100)
committerJoas Schilling <coding@schilljs.com>
Mon, 11 Nov 2024 06:27:00 +0000 (07:27 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/RichObjectStrings/Validator.php
lib/public/RichObjectStrings/IValidator.php

index d1148940200a99a87796a541253803b8182cfa84..f3d2ffd57239f53283b0bc28ce3ad71efe16631d 100644 (file)
@@ -14,6 +14,7 @@ use OCP\RichObjectStrings\IValidator;
 /**
  * Class Validator
  *
+ * @psalm-import-type RichObjectParameter from IValidator
  * @package OCP\RichObjectStrings
  * @since 11.0.0
  */
@@ -27,7 +28,7 @@ class Validator implements IValidator {
 
        /**
         * @param string $subject
-        * @param array<non-empty-string, array<non-empty-string, string>> $parameters
+        * @param array<non-empty-string, RichObjectParameter> $parameters
         * @throws InvalidObjectExeption
         * @since 11.0.0
         */
index 122e5ca992d7d02073fddcc8816d069603942ac8..255378abe4127fc5cf174f93c996b825340e487e 100644 (file)
@@ -11,6 +11,36 @@ namespace OCP\RichObjectStrings;
 /**
  * Class Validator
  *
+ * @psalm-type RichObjectParameter = array{
+ *     type: string,
+ *     id: string,
+ *     name: string,
+ *     server?: string,
+ *     link?: string,
+ *     'call-type'?: 'one2one'|'group'|'public',
+ *     'icon-url'?: string,
+ *     'message-id'?: string,
+ *     boardname?: string,
+ *     stackname?: string,
+ *     size?: string,
+ *     path?: string,
+ *     mimetype?: string,
+ *     'preview-available'?: 'yes'|'no',
+ *     mtime?: string,
+ *     latitude?: string,
+ *     longitude?: string,
+ *     description?: string,
+ *     thumb?: string,
+ *     website?: string,
+ *     visibility?: '0'|'1',
+ *     assignable?: '0'|'1',
+ *     conversation?: string,
+ *     etag?: string,
+ *     permissions?: string,
+ *     width?: string,
+ *     height?: string,
+ * }
+ *
  * @since 11.0.0
  */
 interface IValidator {
@@ -22,7 +52,7 @@ interface IValidator {
 
        /**
         * @param string $subject
-        * @param array<non-empty-string, array<non-empty-string, string>> $parameters
+        * @param array<non-empty-string, RichObjectParameter> $parameters
         * @throws InvalidObjectExeption
         * @since 11.0.0
         */