Completed
Push — master ( bbc704...bdc76b )
by Joas
25:58 queued 16s
created
lib/public/Notification/InvalidValueException.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -13,20 +13,20 @@
 block discarded – undo
13 13
 
14 14
 #[Catchable(since: '30.0.0')]
15 15
 class InvalidValueException extends \InvalidArgumentException {
16
-	/**
17
-	 * @since 30.0.0
18
-	 */
19
-	public function __construct(
20
-		protected string $field,
21
-		?\Throwable $previous = null,
22
-	) {
23
-		parent::__construct('Value provided for ' . $field . ' is not valid', previous: $previous);
24
-	}
16
+    /**
17
+     * @since 30.0.0
18
+     */
19
+    public function __construct(
20
+        protected string $field,
21
+        ?\Throwable $previous = null,
22
+    ) {
23
+        parent::__construct('Value provided for ' . $field . ' is not valid', previous: $previous);
24
+    }
25 25
 
26
-	/**
27
-	 * @since 30.0.0
28
-	 */
29
-	public function getFieldIdentifier(): string {
30
-		return $this->field;
31
-	}
26
+    /**
27
+     * @since 30.0.0
28
+     */
29
+    public function getFieldIdentifier(): string {
30
+        return $this->field;
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/public/Notification/IApp.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -12,24 +12,24 @@
 block discarded – undo
12 12
 
13 13
 #[Implementable(since: '9.0.0')]
14 14
 interface IApp {
15
-	/**
16
-	 * @param INotification $notification
17
-	 * @throws IncompleteNotificationException When the notification does not have all required fields set
18
-	 * @since 9.0.0
19
-	 * @since 30.0.0 throws {@see IncompleteNotificationException} instead of \InvalidArgumentException
20
-	 */
21
-	public function notify(INotification $notification): void;
15
+    /**
16
+     * @param INotification $notification
17
+     * @throws IncompleteNotificationException When the notification does not have all required fields set
18
+     * @since 9.0.0
19
+     * @since 30.0.0 throws {@see IncompleteNotificationException} instead of \InvalidArgumentException
20
+     */
21
+    public function notify(INotification $notification): void;
22 22
 
23
-	/**
24
-	 * @param INotification $notification
25
-	 * @since 9.0.0
26
-	 */
27
-	public function markProcessed(INotification $notification): void;
23
+    /**
24
+     * @param INotification $notification
25
+     * @since 9.0.0
26
+     */
27
+    public function markProcessed(INotification $notification): void;
28 28
 
29
-	/**
30
-	 * @param INotification $notification
31
-	 * @return int
32
-	 * @since 9.0.0
33
-	 */
34
-	public function getCount(INotification $notification): int;
29
+    /**
30
+     * @param INotification $notification
31
+     * @return int
32
+     * @since 9.0.0
33
+     */
34
+    public function getCount(INotification $notification): int;
35 35
 }
Please login to merge, or discard this patch.
lib/public/Notification/INotification.php 1 patch
Indentation   +316 added lines, -316 removed lines patch added patch discarded remove patch
@@ -12,320 +12,320 @@
 block discarded – undo
12 12
 
13 13
 #[Consumable(since: '9.0.0')]
14 14
 interface INotification {
15
-	/**
16
-	 * @param string $app
17
-	 * @return $this
18
-	 * @throws InvalidValueException if the app id is invalid
19
-	 * @since 9.0.0
20
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
21
-	 */
22
-	public function setApp(string $app): INotification;
23
-
24
-	/**
25
-	 * @return string
26
-	 * @since 9.0.0
27
-	 */
28
-	public function getApp(): string;
29
-
30
-	/**
31
-	 * @param string $user
32
-	 * @return $this
33
-	 * @throws InvalidValueException if the user id is invalid
34
-	 * @since 9.0.0
35
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
36
-	 */
37
-	public function setUser(string $user): INotification;
38
-
39
-	/**
40
-	 * @return string
41
-	 * @since 9.0.0
42
-	 */
43
-	public function getUser(): string;
44
-
45
-	/**
46
-	 * @param \DateTime $dateTime
47
-	 * @return $this
48
-	 * @throws InvalidValueException if the $dateTime is invalid
49
-	 * @since 9.0.0
50
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
51
-	 */
52
-	public function setDateTime(\DateTime $dateTime): INotification;
53
-
54
-	/**
55
-	 * @return \DateTime
56
-	 * @since 9.0.0
57
-	 */
58
-	public function getDateTime(): \DateTime;
59
-
60
-	/**
61
-	 * @param string $type
62
-	 * @param string $id
63
-	 * @return $this
64
-	 * @throws InvalidValueException if the object type or id is invalid
65
-	 * @since 9.0.0
66
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
67
-	 */
68
-	public function setObject(string $type, string $id): INotification;
69
-
70
-	/**
71
-	 * @return string
72
-	 * @since 9.0.0
73
-	 */
74
-	public function getObjectType(): string;
75
-
76
-	/**
77
-	 * @return string
78
-	 * @since 9.0.0
79
-	 */
80
-	public function getObjectId(): string;
81
-
82
-	/**
83
-	 * @param string $subject
84
-	 * @param array $parameters
85
-	 * @return $this
86
-	 * @throws InvalidValueException if the subject or parameters are invalid
87
-	 * @since 9.0.0
88
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
89
-	 */
90
-	public function setSubject(string $subject, array $parameters = []): INotification;
91
-
92
-	/**
93
-	 * @return string
94
-	 * @since 9.0.0
95
-	 */
96
-	public function getSubject(): string;
97
-
98
-	/**
99
-	 * @return array
100
-	 * @since 9.0.0
101
-	 */
102
-	public function getSubjectParameters(): array;
103
-
104
-	/**
105
-	 * Set a parsed subject
106
-	 *
107
-	 * HTML is not allowed in the parsed subject and will be escaped
108
-	 * automatically by the clients. You can use the RichObjectString system
109
-	 * provided by the Nextcloud server to highlight important parameters via
110
-	 * the setRichSubject method.
111
-	 *
112
-	 * See https://github.com/nextcloud/server/issues/1706 for more information.
113
-	 *
114
-	 * @param string $subject
115
-	 * @return $this
116
-	 * @throws InvalidValueException if the subject is invalid
117
-	 * @since 9.0.0
118
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
119
-	 */
120
-	public function setParsedSubject(string $subject): INotification;
121
-
122
-	/**
123
-	 * @return string
124
-	 * @since 9.0.0
125
-	 */
126
-	public function getParsedSubject(): string;
127
-
128
-	/**
129
-	 * Set a RichObjectString subject
130
-	 *
131
-	 * HTML is not allowed in the rich subject and will be escaped automatically
132
-	 * by the clients, but you can use the RichObjectString system provided by
133
-	 * the Nextcloud server to highlight important parameters.
134
-	 *
135
-	 * See https://github.com/nextcloud/server/issues/1706 for more information.
136
-	 *
137
-	 * @param string $subject
138
-	 * @param array<string, array<string, string>> $parameters
139
-	 * @return $this
140
-	 * @throws InvalidValueException if the subject or parameters are invalid
141
-	 * @since 11.0.0
142
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
143
-	 */
144
-	public function setRichSubject(string $subject, array $parameters = []): INotification;
145
-
146
-	/**
147
-	 * @return string
148
-	 * @since 11.0.0
149
-	 */
150
-	public function getRichSubject(): string;
151
-
152
-	/**
153
-	 * @return array[]
154
-	 * @since 11.0.0
155
-	 */
156
-	public function getRichSubjectParameters(): array;
157
-
158
-	/**
159
-	 * @param string $message
160
-	 * @param array $parameters
161
-	 * @return $this
162
-	 * @throws InvalidValueException if the message or parameters are invalid
163
-	 * @since 9.0.0
164
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
165
-	 */
166
-	public function setMessage(string $message, array $parameters = []): INotification;
167
-
168
-	/**
169
-	 * @return string
170
-	 * @since 9.0.0
171
-	 */
172
-	public function getMessage(): string;
173
-
174
-	/**
175
-	 * @return array
176
-	 * @since 9.0.0
177
-	 */
178
-	public function getMessageParameters(): array;
179
-
180
-	/**
181
-	 * Set a parsed message
182
-	 *
183
-	 * HTML is not allowed in the parsed message and will be escaped
184
-	 * automatically by the clients. You can use the RichObjectString system
185
-	 * provided by the Nextcloud server to highlight important parameters via
186
-	 * the setRichMessage method.
187
-	 *
188
-	 * See https://github.com/nextcloud/server/issues/1706 for more information.
189
-	 *
190
-	 * @param string $message
191
-	 * @return $this
192
-	 * @throws InvalidValueException if the message is invalid
193
-	 * @since 9.0.0
194
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
195
-	 */
196
-	public function setParsedMessage(string $message): INotification;
197
-
198
-	/**
199
-	 * @return string
200
-	 * @since 9.0.0
201
-	 */
202
-	public function getParsedMessage(): string;
203
-
204
-	/**
205
-	 * Set a RichObjectString message
206
-	 *
207
-	 * HTML is not allowed in the rich message and will be escaped automatically
208
-	 * by the clients, but you can use the RichObjectString system provided by
209
-	 * the Nextcloud server to highlight important parameters.
210
-	 *
211
-	 * See https://github.com/nextcloud/server/issues/1706 for more information.
212
-	 *
213
-	 * @param string $message
214
-	 * @param array<string, array<string, string>> $parameters
215
-	 * @return $this
216
-	 * @throws InvalidValueException if the message or parameters are invalid
217
-	 * @since 11.0.0
218
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
219
-	 */
220
-	public function setRichMessage(string $message, array $parameters = []): INotification;
221
-
222
-	/**
223
-	 * @return string
224
-	 * @since 11.0.0
225
-	 */
226
-	public function getRichMessage(): string;
227
-
228
-	/**
229
-	 * @return array[]
230
-	 * @since 11.0.0
231
-	 */
232
-	public function getRichMessageParameters(): array;
233
-
234
-	/**
235
-	 * @param string $link
236
-	 * @return $this
237
-	 * @throws InvalidValueException if the link is invalid
238
-	 * @since 9.0.0
239
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
240
-	 */
241
-	public function setLink(string $link): INotification;
242
-
243
-	/**
244
-	 * @return string
245
-	 * @since 9.0.0
246
-	 */
247
-	public function getLink(): string;
248
-
249
-	/**
250
-	 * Set the absolute url for the icon (should be colored black or not have a color)
251
-	 *
252
-	 * It's automatically color inverted by clients when needed
253
-	 *
254
-	 * @param string $icon
255
-	 * @return $this
256
-	 * @throws InvalidValueException if the icon is invalid
257
-	 * @since 11.0.0
258
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
259
-	 */
260
-	public function setIcon(string $icon): INotification;
261
-
262
-	/**
263
-	 * Get the absolute url for the icon (should be colored black or not have a color)
264
-	 *
265
-	 * It's automatically color inverted by clients when needed
266
-	 *
267
-	 * @return string
268
-	 * @since 11.0.0
269
-	 */
270
-	public function getIcon(): string;
271
-
272
-	/**
273
-	 * @return $this
274
-	 * @throws InvalidValueException if the app is not allowed to send priority notifications
275
-	 * @since 31.0.0
276
-	 */
277
-	public function setPriorityNotification(bool $priorityNotification): INotification;
278
-
279
-	/**
280
-	 * @since 31.0.0
281
-	 */
282
-	public function isPriorityNotification(): bool;
283
-
284
-	/**
285
-	 * @return IAction
286
-	 * @since 9.0.0
287
-	 */
288
-	public function createAction(): IAction;
289
-
290
-	/**
291
-	 * @param IAction $action
292
-	 * @return $this
293
-	 * @throws InvalidValueException if the action is invalid
294
-	 * @since 9.0.0
295
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
296
-	 */
297
-	public function addAction(IAction $action): INotification;
298
-
299
-	/**
300
-	 * @return IAction[]
301
-	 * @since 9.0.0
302
-	 */
303
-	public function getActions(): array;
304
-
305
-	/**
306
-	 * @param IAction $action
307
-	 * @return $this
308
-	 * @throws InvalidValueException if the action is invalid
309
-	 * @since 9.0.0
310
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
311
-	 */
312
-	public function addParsedAction(IAction $action): INotification;
313
-
314
-	/**
315
-	 * @return IAction[]
316
-	 * @since 9.0.0
317
-	 */
318
-	public function getParsedActions(): array;
319
-
320
-	/**
321
-	 * @return bool
322
-	 * @since 9.0.0
323
-	 */
324
-	public function isValid(): bool;
325
-
326
-	/**
327
-	 * @return bool
328
-	 * @since 9.0.0
329
-	 */
330
-	public function isValidParsed(): bool;
15
+    /**
16
+     * @param string $app
17
+     * @return $this
18
+     * @throws InvalidValueException if the app id is invalid
19
+     * @since 9.0.0
20
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
21
+     */
22
+    public function setApp(string $app): INotification;
23
+
24
+    /**
25
+     * @return string
26
+     * @since 9.0.0
27
+     */
28
+    public function getApp(): string;
29
+
30
+    /**
31
+     * @param string $user
32
+     * @return $this
33
+     * @throws InvalidValueException if the user id is invalid
34
+     * @since 9.0.0
35
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
36
+     */
37
+    public function setUser(string $user): INotification;
38
+
39
+    /**
40
+     * @return string
41
+     * @since 9.0.0
42
+     */
43
+    public function getUser(): string;
44
+
45
+    /**
46
+     * @param \DateTime $dateTime
47
+     * @return $this
48
+     * @throws InvalidValueException if the $dateTime is invalid
49
+     * @since 9.0.0
50
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
51
+     */
52
+    public function setDateTime(\DateTime $dateTime): INotification;
53
+
54
+    /**
55
+     * @return \DateTime
56
+     * @since 9.0.0
57
+     */
58
+    public function getDateTime(): \DateTime;
59
+
60
+    /**
61
+     * @param string $type
62
+     * @param string $id
63
+     * @return $this
64
+     * @throws InvalidValueException if the object type or id is invalid
65
+     * @since 9.0.0
66
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
67
+     */
68
+    public function setObject(string $type, string $id): INotification;
69
+
70
+    /**
71
+     * @return string
72
+     * @since 9.0.0
73
+     */
74
+    public function getObjectType(): string;
75
+
76
+    /**
77
+     * @return string
78
+     * @since 9.0.0
79
+     */
80
+    public function getObjectId(): string;
81
+
82
+    /**
83
+     * @param string $subject
84
+     * @param array $parameters
85
+     * @return $this
86
+     * @throws InvalidValueException if the subject or parameters are invalid
87
+     * @since 9.0.0
88
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
89
+     */
90
+    public function setSubject(string $subject, array $parameters = []): INotification;
91
+
92
+    /**
93
+     * @return string
94
+     * @since 9.0.0
95
+     */
96
+    public function getSubject(): string;
97
+
98
+    /**
99
+     * @return array
100
+     * @since 9.0.0
101
+     */
102
+    public function getSubjectParameters(): array;
103
+
104
+    /**
105
+     * Set a parsed subject
106
+     *
107
+     * HTML is not allowed in the parsed subject and will be escaped
108
+     * automatically by the clients. You can use the RichObjectString system
109
+     * provided by the Nextcloud server to highlight important parameters via
110
+     * the setRichSubject method.
111
+     *
112
+     * See https://github.com/nextcloud/server/issues/1706 for more information.
113
+     *
114
+     * @param string $subject
115
+     * @return $this
116
+     * @throws InvalidValueException if the subject is invalid
117
+     * @since 9.0.0
118
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
119
+     */
120
+    public function setParsedSubject(string $subject): INotification;
121
+
122
+    /**
123
+     * @return string
124
+     * @since 9.0.0
125
+     */
126
+    public function getParsedSubject(): string;
127
+
128
+    /**
129
+     * Set a RichObjectString subject
130
+     *
131
+     * HTML is not allowed in the rich subject and will be escaped automatically
132
+     * by the clients, but you can use the RichObjectString system provided by
133
+     * the Nextcloud server to highlight important parameters.
134
+     *
135
+     * See https://github.com/nextcloud/server/issues/1706 for more information.
136
+     *
137
+     * @param string $subject
138
+     * @param array<string, array<string, string>> $parameters
139
+     * @return $this
140
+     * @throws InvalidValueException if the subject or parameters are invalid
141
+     * @since 11.0.0
142
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
143
+     */
144
+    public function setRichSubject(string $subject, array $parameters = []): INotification;
145
+
146
+    /**
147
+     * @return string
148
+     * @since 11.0.0
149
+     */
150
+    public function getRichSubject(): string;
151
+
152
+    /**
153
+     * @return array[]
154
+     * @since 11.0.0
155
+     */
156
+    public function getRichSubjectParameters(): array;
157
+
158
+    /**
159
+     * @param string $message
160
+     * @param array $parameters
161
+     * @return $this
162
+     * @throws InvalidValueException if the message or parameters are invalid
163
+     * @since 9.0.0
164
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
165
+     */
166
+    public function setMessage(string $message, array $parameters = []): INotification;
167
+
168
+    /**
169
+     * @return string
170
+     * @since 9.0.0
171
+     */
172
+    public function getMessage(): string;
173
+
174
+    /**
175
+     * @return array
176
+     * @since 9.0.0
177
+     */
178
+    public function getMessageParameters(): array;
179
+
180
+    /**
181
+     * Set a parsed message
182
+     *
183
+     * HTML is not allowed in the parsed message and will be escaped
184
+     * automatically by the clients. You can use the RichObjectString system
185
+     * provided by the Nextcloud server to highlight important parameters via
186
+     * the setRichMessage method.
187
+     *
188
+     * See https://github.com/nextcloud/server/issues/1706 for more information.
189
+     *
190
+     * @param string $message
191
+     * @return $this
192
+     * @throws InvalidValueException if the message is invalid
193
+     * @since 9.0.0
194
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
195
+     */
196
+    public function setParsedMessage(string $message): INotification;
197
+
198
+    /**
199
+     * @return string
200
+     * @since 9.0.0
201
+     */
202
+    public function getParsedMessage(): string;
203
+
204
+    /**
205
+     * Set a RichObjectString message
206
+     *
207
+     * HTML is not allowed in the rich message and will be escaped automatically
208
+     * by the clients, but you can use the RichObjectString system provided by
209
+     * the Nextcloud server to highlight important parameters.
210
+     *
211
+     * See https://github.com/nextcloud/server/issues/1706 for more information.
212
+     *
213
+     * @param string $message
214
+     * @param array<string, array<string, string>> $parameters
215
+     * @return $this
216
+     * @throws InvalidValueException if the message or parameters are invalid
217
+     * @since 11.0.0
218
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
219
+     */
220
+    public function setRichMessage(string $message, array $parameters = []): INotification;
221
+
222
+    /**
223
+     * @return string
224
+     * @since 11.0.0
225
+     */
226
+    public function getRichMessage(): string;
227
+
228
+    /**
229
+     * @return array[]
230
+     * @since 11.0.0
231
+     */
232
+    public function getRichMessageParameters(): array;
233
+
234
+    /**
235
+     * @param string $link
236
+     * @return $this
237
+     * @throws InvalidValueException if the link is invalid
238
+     * @since 9.0.0
239
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
240
+     */
241
+    public function setLink(string $link): INotification;
242
+
243
+    /**
244
+     * @return string
245
+     * @since 9.0.0
246
+     */
247
+    public function getLink(): string;
248
+
249
+    /**
250
+     * Set the absolute url for the icon (should be colored black or not have a color)
251
+     *
252
+     * It's automatically color inverted by clients when needed
253
+     *
254
+     * @param string $icon
255
+     * @return $this
256
+     * @throws InvalidValueException if the icon is invalid
257
+     * @since 11.0.0
258
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
259
+     */
260
+    public function setIcon(string $icon): INotification;
261
+
262
+    /**
263
+     * Get the absolute url for the icon (should be colored black or not have a color)
264
+     *
265
+     * It's automatically color inverted by clients when needed
266
+     *
267
+     * @return string
268
+     * @since 11.0.0
269
+     */
270
+    public function getIcon(): string;
271
+
272
+    /**
273
+     * @return $this
274
+     * @throws InvalidValueException if the app is not allowed to send priority notifications
275
+     * @since 31.0.0
276
+     */
277
+    public function setPriorityNotification(bool $priorityNotification): INotification;
278
+
279
+    /**
280
+     * @since 31.0.0
281
+     */
282
+    public function isPriorityNotification(): bool;
283
+
284
+    /**
285
+     * @return IAction
286
+     * @since 9.0.0
287
+     */
288
+    public function createAction(): IAction;
289
+
290
+    /**
291
+     * @param IAction $action
292
+     * @return $this
293
+     * @throws InvalidValueException if the action is invalid
294
+     * @since 9.0.0
295
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
296
+     */
297
+    public function addAction(IAction $action): INotification;
298
+
299
+    /**
300
+     * @return IAction[]
301
+     * @since 9.0.0
302
+     */
303
+    public function getActions(): array;
304
+
305
+    /**
306
+     * @param IAction $action
307
+     * @return $this
308
+     * @throws InvalidValueException if the action is invalid
309
+     * @since 9.0.0
310
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
311
+     */
312
+    public function addParsedAction(IAction $action): INotification;
313
+
314
+    /**
315
+     * @return IAction[]
316
+     * @since 9.0.0
317
+     */
318
+    public function getParsedActions(): array;
319
+
320
+    /**
321
+     * @return bool
322
+     * @since 9.0.0
323
+     */
324
+    public function isValid(): bool;
325
+
326
+    /**
327
+     * @return bool
328
+     * @since 9.0.0
329
+     */
330
+    public function isValidParsed(): bool;
331 331
 }
Please login to merge, or discard this patch.
lib/public/Notification/IManager.php 1 patch
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -12,91 +12,91 @@
 block discarded – undo
12 12
 
13 13
 #[Consumable(since: '9.0.0')]
14 14
 interface IManager extends IApp, INotifier {
15
-	/**
16
-	 * @param string $appClass The service must implement IApp, otherwise a
17
-	 *                         \InvalidArgumentException is thrown later
18
-	 * @since 17.0.0
19
-	 */
20
-	public function registerApp(string $appClass): void;
15
+    /**
16
+     * @param string $appClass The service must implement IApp, otherwise a
17
+     *                         \InvalidArgumentException is thrown later
18
+     * @since 17.0.0
19
+     */
20
+    public function registerApp(string $appClass): void;
21 21
 
22
-	/**
23
-	 * @param \Closure $service The service must implement INotifier, otherwise a
24
-	 *                          \InvalidArgumentException is thrown later
25
-	 * @param \Closure $info An array with the keys 'id' and 'name' containing
26
-	 *                       the app id and the app name
27
-	 * @deprecated 17.0.0 use registerNotifierService instead.
28
-	 * @since 8.2.0 - Parameter $info was added in 9.0.0
29
-	 */
30
-	public function registerNotifier(\Closure $service, \Closure $info);
22
+    /**
23
+     * @param \Closure $service The service must implement INotifier, otherwise a
24
+     *                          \InvalidArgumentException is thrown later
25
+     * @param \Closure $info An array with the keys 'id' and 'name' containing
26
+     *                       the app id and the app name
27
+     * @deprecated 17.0.0 use registerNotifierService instead.
28
+     * @since 8.2.0 - Parameter $info was added in 9.0.0
29
+     */
30
+    public function registerNotifier(\Closure $service, \Closure $info);
31 31
 
32
-	/**
33
-	 * @param string $notifierService The service must implement INotifier, otherwise a
34
-	 *                                \InvalidArgumentException is thrown later
35
-	 * @since 17.0.0
36
-	 * @deprecated 22.0.0 use the IBootStrap registration context
37
-	 */
38
-	public function registerNotifierService(string $notifierService): void;
32
+    /**
33
+     * @param string $notifierService The service must implement INotifier, otherwise a
34
+     *                                \InvalidArgumentException is thrown later
35
+     * @since 17.0.0
36
+     * @deprecated 22.0.0 use the IBootStrap registration context
37
+     */
38
+    public function registerNotifierService(string $notifierService): void;
39 39
 
40
-	/**
41
-	 * @return INotifier[]
42
-	 * @since 9.0.0
43
-	 */
44
-	public function getNotifiers(): array;
40
+    /**
41
+     * @return INotifier[]
42
+     * @since 9.0.0
43
+     */
44
+    public function getNotifiers(): array;
45 45
 
46
-	/**
47
-	 * @return INotification
48
-	 * @since 9.0.0
49
-	 */
50
-	public function createNotification(): INotification;
46
+    /**
47
+     * @return INotification
48
+     * @since 9.0.0
49
+     */
50
+    public function createNotification(): INotification;
51 51
 
52
-	/**
53
-	 * @return bool
54
-	 * @since 9.0.0
55
-	 */
56
-	public function hasNotifiers(): bool;
52
+    /**
53
+     * @return bool
54
+     * @since 9.0.0
55
+     */
56
+    public function hasNotifiers(): bool;
57 57
 
58
-	/**
59
-	 * @param bool $preparingPushNotification
60
-	 * @since 14.0.0
61
-	 */
62
-	public function setPreparingPushNotification(bool $preparingPushNotification): void;
58
+    /**
59
+     * @param bool $preparingPushNotification
60
+     * @since 14.0.0
61
+     */
62
+    public function setPreparingPushNotification(bool $preparingPushNotification): void;
63 63
 
64
-	/**
65
-	 * @return bool
66
-	 * @since 14.0.0
67
-	 */
68
-	public function isPreparingPushNotification(): bool;
64
+    /**
65
+     * @return bool
66
+     * @since 14.0.0
67
+     */
68
+    public function isPreparingPushNotification(): bool;
69 69
 
70
-	/**
71
-	 * @since 18.0.0
72
-	 */
73
-	public function dismissNotification(INotification $notification): void;
70
+    /**
71
+     * @since 18.0.0
72
+     */
73
+    public function dismissNotification(INotification $notification): void;
74 74
 
75
-	/**
76
-	 * Start deferring notifications until `flush()` is called
77
-	 *
78
-	 * The calling app should only "flush" when it got returned true on the defer call,
79
-	 * otherwise another app is deferring the sending already.
80
-	 * @return bool
81
-	 * @since 20.0.0
82
-	 */
83
-	public function defer(): bool;
75
+    /**
76
+     * Start deferring notifications until `flush()` is called
77
+     *
78
+     * The calling app should only "flush" when it got returned true on the defer call,
79
+     * otherwise another app is deferring the sending already.
80
+     * @return bool
81
+     * @since 20.0.0
82
+     */
83
+    public function defer(): bool;
84 84
 
85
-	/**
86
-	 * Send all deferred notifications that have been stored since `defer()` was called
87
-	 *
88
-	 * @since 20.0.0
89
-	 */
90
-	public function flush(): void;
85
+    /**
86
+     * Send all deferred notifications that have been stored since `defer()` was called
87
+     *
88
+     * @since 20.0.0
89
+     */
90
+    public function flush(): void;
91 91
 
92
-	/**
93
-	 * Whether the server can use the hosted push notification service
94
-	 *
95
-	 * We want to keep offering our push notification service for free, but large
96
-	 * users overload our infrastructure. For this reason we have to rate-limit the
97
-	 * use of push notifications. If you need this feature, consider using Nextcloud Enterprise.
98
-	 *
99
-	 * @since 23.0.0
100
-	 */
101
-	public function isFairUseOfFreePushService(): bool;
92
+    /**
93
+     * Whether the server can use the hosted push notification service
94
+     *
95
+     * We want to keep offering our push notification service for free, but large
96
+     * users overload our infrastructure. For this reason we have to rate-limit the
97
+     * use of push notifications. If you need this feature, consider using Nextcloud Enterprise.
98
+     *
99
+     * @since 23.0.0
100
+     */
101
+    public function isFairUseOfFreePushService(): bool;
102 102
 }
Please login to merge, or discard this patch.
lib/public/Notification/IDismissableNotifier.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
  */
20 20
 #[Implementable(since: '18.0.0')]
21 21
 interface IDismissableNotifier extends INotifier {
22
-	/**
23
-	 * @param INotification $notification
24
-	 * @throws UnknownNotificationException when the notifier is not in charge of the notification
25
-	 *
26
-	 * @since 18.0.0
27
-	 * @since 30.0.0 Notifiers should throw {@see UnknownNotificationException} instead of \InvalidArgumentException
28
-	 *  when they did not handle the notification. Throwing \InvalidArgumentException directly is deprecated and will
29
-	 *  be logged as an error in Nextcloud 39.
30
-	 */
31
-	public function dismissNotification(INotification $notification): void;
22
+    /**
23
+     * @param INotification $notification
24
+     * @throws UnknownNotificationException when the notifier is not in charge of the notification
25
+     *
26
+     * @since 18.0.0
27
+     * @since 30.0.0 Notifiers should throw {@see UnknownNotificationException} instead of \InvalidArgumentException
28
+     *  when they did not handle the notification. Throwing \InvalidArgumentException directly is deprecated and will
29
+     *  be logged as an error in Nextcloud 39.
30
+     */
31
+    public function dismissNotification(INotification $notification): void;
32 32
 }
Please login to merge, or discard this patch.
lib/public/Notification/AlreadyProcessedException.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
 
13 13
 #[Throwable(since: '17.0.0')]
14 14
 class AlreadyProcessedException extends \RuntimeException {
15
-	/**
16
-	 * @since 17.0.0
17
-	 */
18
-	public function __construct() {
19
-		parent::__construct('Notification is processed already');
20
-	}
15
+    /**
16
+     * @since 17.0.0
17
+     */
18
+    public function __construct() {
19
+        parent::__construct('Notification is processed already');
20
+    }
21 21
 }
Please login to merge, or discard this patch.
lib/public/Notification/IDeferrableApp.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,17 +12,17 @@
 block discarded – undo
12 12
 
13 13
 #[Implementable(since: '20.0.0')]
14 14
 interface IDeferrableApp extends IApp {
15
-	/**
16
-	 * Start deferring notifications until `flush()` is called
17
-	 *
18
-	 * @since 20.0.0
19
-	 */
20
-	public function defer(): void;
15
+    /**
16
+     * Start deferring notifications until `flush()` is called
17
+     *
18
+     * @since 20.0.0
19
+     */
20
+    public function defer(): void;
21 21
 
22
-	/**
23
-	 * Send all deferred notifications that have been stored since `defer()` was called
24
-	 *
25
-	 * @since 20.0.0
26
-	 */
27
-	public function flush(): void;
22
+    /**
23
+     * Send all deferred notifications that have been stored since `defer()` was called
24
+     *
25
+     * @since 20.0.0
26
+     */
27
+    public function flush(): void;
28 28
 }
Please login to merge, or discard this patch.
lib/public/Notification/IAction.php 1 patch
Indentation   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -12,101 +12,101 @@
 block discarded – undo
12 12
 
13 13
 #[Consumable(since: '9.0.0')]
14 14
 interface IAction {
15
-	/**
16
-	 * @since 17.0.0
17
-	 */
18
-	public const TYPE_GET = 'GET';
19
-	/**
20
-	 * @since 17.0.0
21
-	 */
22
-	public const TYPE_POST = 'POST';
23
-	/**
24
-	 * @since 17.0.0
25
-	 */
26
-	public const TYPE_PUT = 'PUT';
27
-	/**
28
-	 * @since 17.0.0
29
-	 */
30
-	public const TYPE_DELETE = 'DELETE';
31
-	/**
32
-	 * @since 17.0.0
33
-	 */
34
-	public const TYPE_WEB = 'WEB';
15
+    /**
16
+     * @since 17.0.0
17
+     */
18
+    public const TYPE_GET = 'GET';
19
+    /**
20
+     * @since 17.0.0
21
+     */
22
+    public const TYPE_POST = 'POST';
23
+    /**
24
+     * @since 17.0.0
25
+     */
26
+    public const TYPE_PUT = 'PUT';
27
+    /**
28
+     * @since 17.0.0
29
+     */
30
+    public const TYPE_DELETE = 'DELETE';
31
+    /**
32
+     * @since 17.0.0
33
+     */
34
+    public const TYPE_WEB = 'WEB';
35 35
 
36
-	/**
37
-	 * @param string $label
38
-	 * @return $this
39
-	 * @throws InvalidValueException if the label is invalid
40
-	 * @since 9.0.0
41
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
42
-	 */
43
-	public function setLabel(string $label): IAction;
36
+    /**
37
+     * @param string $label
38
+     * @return $this
39
+     * @throws InvalidValueException if the label is invalid
40
+     * @since 9.0.0
41
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
42
+     */
43
+    public function setLabel(string $label): IAction;
44 44
 
45
-	/**
46
-	 * @return string
47
-	 * @since 9.0.0
48
-	 */
49
-	public function getLabel(): string;
45
+    /**
46
+     * @return string
47
+     * @since 9.0.0
48
+     */
49
+    public function getLabel(): string;
50 50
 
51
-	/**
52
-	 * @param string $label
53
-	 * @return $this
54
-	 * @throws InvalidValueException if the label is invalid
55
-	 * @since 9.0.0
56
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
57
-	 */
58
-	public function setParsedLabel(string $label): IAction;
51
+    /**
52
+     * @param string $label
53
+     * @return $this
54
+     * @throws InvalidValueException if the label is invalid
55
+     * @since 9.0.0
56
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
57
+     */
58
+    public function setParsedLabel(string $label): IAction;
59 59
 
60
-	/**
61
-	 * @return string
62
-	 * @since 9.0.0
63
-	 */
64
-	public function getParsedLabel(): string;
60
+    /**
61
+     * @return string
62
+     * @since 9.0.0
63
+     */
64
+    public function getParsedLabel(): string;
65 65
 
66
-	/**
67
-	 * @param bool $primary
68
-	 * @return $this
69
-	 * @since 9.0.0
70
-	 */
71
-	public function setPrimary(bool $primary): IAction;
66
+    /**
67
+     * @param bool $primary
68
+     * @return $this
69
+     * @since 9.0.0
70
+     */
71
+    public function setPrimary(bool $primary): IAction;
72 72
 
73
-	/**
74
-	 * @return bool
75
-	 * @since 9.0.0
76
-	 */
77
-	public function isPrimary(): bool;
73
+    /**
74
+     * @return bool
75
+     * @since 9.0.0
76
+     */
77
+    public function isPrimary(): bool;
78 78
 
79
-	/**
80
-	 * @param string $link
81
-	 * @param string $requestType
82
-	 * @return $this
83
-	 * @throws InvalidValueException if the link is invalid
84
-	 * @since 9.0.0
85
-	 * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
86
-	 */
87
-	public function setLink(string $link, string $requestType): IAction;
79
+    /**
80
+     * @param string $link
81
+     * @param string $requestType
82
+     * @return $this
83
+     * @throws InvalidValueException if the link is invalid
84
+     * @since 9.0.0
85
+     * @since 30.0.0 throws {@see InvalidValueException} instead of \InvalidArgumentException
86
+     */
87
+    public function setLink(string $link, string $requestType): IAction;
88 88
 
89
-	/**
90
-	 * @return string
91
-	 * @since 9.0.0
92
-	 */
93
-	public function getLink(): string;
89
+    /**
90
+     * @return string
91
+     * @since 9.0.0
92
+     */
93
+    public function getLink(): string;
94 94
 
95
-	/**
96
-	 * @return string
97
-	 * @since 9.0.0
98
-	 */
99
-	public function getRequestType(): string;
95
+    /**
96
+     * @return string
97
+     * @since 9.0.0
98
+     */
99
+    public function getRequestType(): string;
100 100
 
101
-	/**
102
-	 * @return bool
103
-	 * @since 9.0.0
104
-	 */
105
-	public function isValid(): bool;
101
+    /**
102
+     * @return bool
103
+     * @since 9.0.0
104
+     */
105
+    public function isValid(): bool;
106 106
 
107
-	/**
108
-	 * @return bool
109
-	 * @since 9.0.0
110
-	 */
111
-	public function isValidParsed(): bool;
107
+    /**
108
+     * @return bool
109
+     * @since 9.0.0
110
+     */
111
+    public function isValidParsed(): bool;
112 112
 }
Please login to merge, or discard this patch.
lib/public/Notification/INotifier.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -12,35 +12,35 @@
 block discarded – undo
12 12
 
13 13
 #[Implementable(since: '9.0.0')]
14 14
 interface INotifier {
15
-	/**
16
-	 * Identifier of the notifier, only use [a-z0-9_]
17
-	 *
18
-	 * @return string
19
-	 * @since 17.0.0
20
-	 */
21
-	public function getID(): string;
15
+    /**
16
+     * Identifier of the notifier, only use [a-z0-9_]
17
+     *
18
+     * @return string
19
+     * @since 17.0.0
20
+     */
21
+    public function getID(): string;
22 22
 
23
-	/**
24
-	 * Human-readable name describing the notifier
25
-	 *
26
-	 * @return string
27
-	 * @since 17.0.0
28
-	 */
29
-	public function getName(): string;
23
+    /**
24
+     * Human-readable name describing the notifier
25
+     *
26
+     * @return string
27
+     * @since 17.0.0
28
+     */
29
+    public function getName(): string;
30 30
 
31
-	/**
32
-	 * @param INotification $notification
33
-	 * @param string $languageCode The code of the language that should be used to prepare the notification
34
-	 * @return INotification
35
-	 * @throws UnknownNotificationException When the notification was not prepared by a notifier
36
-	 * @throws AlreadyProcessedException When the notification is not needed anymore and should be deleted
37
-	 * @throws IncompleteParsedNotificationException Only to be thrown by the {@see IManager}
38
-	 * @since 9.0.0
39
-	 * @since 30.0.0 Notifiers should throw {@see UnknownNotificationException} instead of \InvalidArgumentException
40
-	 *  when they did not handle the notification. Throwing \InvalidArgumentException directly is deprecated and will
41
-	 *  be logged as an error in Nextcloud 39.
42
-	 * @since 30.0.0 Throws {@see IncompleteParsedNotificationException} when not all required fields
43
-	 *  are set at the end of the manager or after a INotifier that claimed to have parsed the notification.
44
-	 */
45
-	public function prepare(INotification $notification, string $languageCode): INotification;
31
+    /**
32
+     * @param INotification $notification
33
+     * @param string $languageCode The code of the language that should be used to prepare the notification
34
+     * @return INotification
35
+     * @throws UnknownNotificationException When the notification was not prepared by a notifier
36
+     * @throws AlreadyProcessedException When the notification is not needed anymore and should be deleted
37
+     * @throws IncompleteParsedNotificationException Only to be thrown by the {@see IManager}
38
+     * @since 9.0.0
39
+     * @since 30.0.0 Notifiers should throw {@see UnknownNotificationException} instead of \InvalidArgumentException
40
+     *  when they did not handle the notification. Throwing \InvalidArgumentException directly is deprecated and will
41
+     *  be logged as an error in Nextcloud 39.
42
+     * @since 30.0.0 Throws {@see IncompleteParsedNotificationException} when not all required fields
43
+     *  are set at the end of the manager or after a INotifier that claimed to have parsed the notification.
44
+     */
45
+    public function prepare(INotification $notification, string $languageCode): INotification;
46 46
 }
Please login to merge, or discard this patch.