Skip to content

Commit a3be6ce

Browse files
Merge pull request #49192 from nextcloud/bugfix/noid/copy-better-typing-from-notifications-app
fix(ros): Copy better typing information from Notifications/Spreed app
2 parents 4d69d1e + e388083 commit a3be6ce

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

lib/private/RichObjectStrings/Validator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* Class Validator
1616
*
17+
* @psalm-import-type RichObjectParameter from IValidator
1718
* @package OCP\RichObjectStrings
1819
* @since 11.0.0
1920
*/
@@ -27,7 +28,7 @@ public function __construct(
2728

2829
/**
2930
* @param string $subject
30-
* @param array<non-empty-string, array<non-empty-string, string>> $parameters
31+
* @param array<non-empty-string, RichObjectParameter> $parameters
3132
* @throws InvalidObjectExeption
3233
* @since 11.0.0
3334
*/

lib/public/RichObjectStrings/IValidator.php

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,36 @@
1111
/**
1212
* Class Validator
1313
*
14+
* @psalm-type RichObjectParameter = array{
15+
* type: string,
16+
* id: string,
17+
* name: string,
18+
* server?: string,
19+
* link?: string,
20+
* 'call-type'?: 'one2one'|'group'|'public',
21+
* 'icon-url'?: string,
22+
* 'message-id'?: string,
23+
* boardname?: string,
24+
* stackname?: string,
25+
* size?: string,
26+
* path?: string,
27+
* mimetype?: string,
28+
* 'preview-available'?: 'yes'|'no',
29+
* mtime?: string,
30+
* latitude?: string,
31+
* longitude?: string,
32+
* description?: string,
33+
* thumb?: string,
34+
* website?: string,
35+
* visibility?: '0'|'1',
36+
* assignable?: '0'|'1',
37+
* conversation?: string,
38+
* etag?: string,
39+
* permissions?: string,
40+
* width?: string,
41+
* height?: string,
42+
* }
43+
*
1444
* @since 11.0.0
1545
*/
1646
interface IValidator {
@@ -22,7 +52,7 @@ interface IValidator {
2252

2353
/**
2454
* @param string $subject
25-
* @param array<non-empty-string, array<non-empty-string, string>> $parameters
55+
* @param array<non-empty-string, RichObjectParameter> $parameters
2656
* @throws InvalidObjectExeption
2757
* @since 11.0.0
2858
*/

0 commit comments

Comments
 (0)