diff options
author | Joas Schilling <coding@schilljs.com> | 2024-11-11 07:27:00 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-11-11 07:27:00 +0100 |
commit | e3880838e8b17aa9402b6866b9446efcb9ad0070 (patch) | |
tree | e9733e879f7afa8988547a045f0d0ffb51a52832 /lib | |
parent | 23071c74a57c881762ebdef3a308a4b33d67d392 (diff) | |
download | nextcloud-server-e3880838e8b17aa9402b6866b9446efcb9ad0070.tar.gz nextcloud-server-e3880838e8b17aa9402b6866b9446efcb9ad0070.zip |
fix(ros): Copy better typing information from Notifications appbugfix/noid/copy-better-typing-from-notifications-app
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/RichObjectStrings/Validator.php | 3 | ||||
-rw-r--r-- | lib/public/RichObjectStrings/IValidator.php | 32 |
2 files changed, 33 insertions, 2 deletions
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<non-empty-string, array<non-empty-string, string>> $parameters + * @param array<non-empty-string, RichObjectParameter> $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<non-empty-string, array<non-empty-string, string>> $parameters + * @param array<non-empty-string, RichObjectParameter> $parameters * @throws InvalidObjectExeption * @since 11.0.0 */ |