From: Joas Schilling Date: Mon, 11 Nov 2024 06:27:00 +0000 (+0100) Subject: fix(ros): Copy better typing information from Notifications app X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e3880838e8b17aa9402b6866b9446efcb9ad0070;p=nextcloud-server.git fix(ros): Copy better typing information from Notifications app Signed-off-by: Joas Schilling --- diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php index d1148940200..f3d2ffd5723 100644 --- a/lib/private/RichObjectStrings/Validator.php +++ b/lib/private/RichObjectStrings/Validator.php @@ -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> $parameters + * @param array $parameters * @throws InvalidObjectExeption * @since 11.0.0 */ diff --git a/lib/public/RichObjectStrings/IValidator.php b/lib/public/RichObjectStrings/IValidator.php index 122e5ca992d..255378abe41 100644 --- a/lib/public/RichObjectStrings/IValidator.php +++ b/lib/public/RichObjectStrings/IValidator.php @@ -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> $parameters + * @param array $parameters * @throws InvalidObjectExeption * @since 11.0.0 */