Passed
Push — master ( a249c6...75e863 )
by Daniel
24:49 queued 08:17
created
lib/public/Dashboard/RegisterWidgetEvent.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -39,23 +39,23 @@
 block discarded – undo
39 39
  * @deprecated 20.0.0
40 40
  */
41 41
 class RegisterWidgetEvent extends Event {
42
-	private $manager;
42
+    private $manager;
43 43
 
44
-	/**
45
-	 * @param IManager $manager
46
-	 * @since 20.0.0
47
-	 */
48
-	public function __construct(IManager $manager) {
49
-		parent::__construct();
44
+    /**
45
+     * @param IManager $manager
46
+     * @since 20.0.0
47
+     */
48
+    public function __construct(IManager $manager) {
49
+        parent::__construct();
50 50
 
51
-		$this->manager = $manager;
52
-	}
51
+        $this->manager = $manager;
52
+    }
53 53
 
54
-	/**
55
-	 * @param string $panelClass
56
-	 * @since 20.0.0
57
-	 */
58
-	public function registerWidget(string $panelClass) {
59
-		$this->manager->lazyRegisterWidget($panelClass);
60
-	}
54
+    /**
55
+     * @param string $panelClass
56
+     * @since 20.0.0
57
+     */
58
+    public function registerWidget(string $panelClass) {
59
+        $this->manager->lazyRegisterWidget($panelClass);
60
+    }
61 61
 }
Please login to merge, or discard this patch.
lib/public/Files/Storage.php 1 patch
Indentation   +420 added lines, -420 removed lines patch added patch discarded remove patch
@@ -47,424 +47,424 @@
 block discarded – undo
47 47
  * @deprecated 9.0.0 use \OCP\Files\Storage\IStorage instead
48 48
  */
49 49
 interface Storage extends IStorage {
50
-	/**
51
-	 * $parameters is a free form array with the configuration options needed to construct the storage
52
-	 *
53
-	 * @param array $parameters
54
-	 * @since 6.0.0
55
-	 */
56
-	public function __construct($parameters);
57
-
58
-	/**
59
-	 * Get the identifier for the storage,
60
-	 * the returned id should be the same for every storage object that is created with the same parameters
61
-	 * and two storage objects with the same id should refer to two storages that display the same files.
62
-	 *
63
-	 * @return string
64
-	 * @since 6.0.0
65
-	 */
66
-	public function getId();
67
-
68
-	/**
69
-	 * see https://www.php.net/manual/en/function.mkdir.php
70
-	 * implementations need to implement a recursive mkdir
71
-	 *
72
-	 * @param string $path
73
-	 * @return bool
74
-	 * @since 6.0.0
75
-	 */
76
-	public function mkdir($path);
77
-
78
-	/**
79
-	 * see https://www.php.net/manual/en/function.rmdir.php
80
-	 *
81
-	 * @param string $path
82
-	 * @return bool
83
-	 * @since 6.0.0
84
-	 */
85
-	public function rmdir($path);
86
-
87
-	/**
88
-	 * see https://www.php.net/manual/en/function.opendir.php
89
-	 *
90
-	 * @param string $path
91
-	 * @return resource|bool
92
-	 * @since 6.0.0
93
-	 */
94
-	public function opendir($path);
95
-
96
-	/**
97
-	 * see https://www.php.net/manual/en/function.is-dir.php
98
-	 *
99
-	 * @param string $path
100
-	 * @return bool
101
-	 * @since 6.0.0
102
-	 */
103
-	public function is_dir($path);
104
-
105
-	/**
106
-	 * see https://www.php.net/manual/en/function.is-file.php
107
-	 *
108
-	 * @param string $path
109
-	 * @return bool
110
-	 * @since 6.0.0
111
-	 */
112
-	public function is_file($path);
113
-
114
-	/**
115
-	 * see https://www.php.net/manual/en/function.stat.php
116
-	 * only the following keys are required in the result: size and mtime
117
-	 *
118
-	 * @param string $path
119
-	 * @return array|bool
120
-	 * @since 6.0.0
121
-	 */
122
-	public function stat($path);
123
-
124
-	/**
125
-	 * see https://www.php.net/manual/en/function.filetype.php
126
-	 *
127
-	 * @param string $path
128
-	 * @return string|bool
129
-	 * @since 6.0.0
130
-	 */
131
-	public function filetype($path);
132
-
133
-	/**
134
-	 * see https://www.php.net/manual/en/function.filesize.php
135
-	 * The result for filesize when called on a folder is required to be 0
136
-	 *
137
-	 * @param string $path
138
-	 * @return int|bool
139
-	 * @since 6.0.0
140
-	 */
141
-	public function filesize($path);
142
-
143
-	/**
144
-	 * check if a file can be created in $path
145
-	 *
146
-	 * @param string $path
147
-	 * @return bool
148
-	 * @since 6.0.0
149
-	 */
150
-	public function isCreatable($path);
151
-
152
-	/**
153
-	 * check if a file can be read
154
-	 *
155
-	 * @param string $path
156
-	 * @return bool
157
-	 * @since 6.0.0
158
-	 */
159
-	public function isReadable($path);
160
-
161
-	/**
162
-	 * check if a file can be written to
163
-	 *
164
-	 * @param string $path
165
-	 * @return bool
166
-	 * @since 6.0.0
167
-	 */
168
-	public function isUpdatable($path);
169
-
170
-	/**
171
-	 * check if a file can be deleted
172
-	 *
173
-	 * @param string $path
174
-	 * @return bool
175
-	 * @since 6.0.0
176
-	 */
177
-	public function isDeletable($path);
178
-
179
-	/**
180
-	 * check if a file can be shared
181
-	 *
182
-	 * @param string $path
183
-	 * @return bool
184
-	 * @since 6.0.0
185
-	 */
186
-	public function isSharable($path);
187
-
188
-	/**
189
-	 * get the full permissions of a path.
190
-	 * Should return a combination of the PERMISSION_ constants defined in lib/public/constants.php
191
-	 *
192
-	 * @param string $path
193
-	 * @return int
194
-	 * @since 6.0.0
195
-	 */
196
-	public function getPermissions($path);
197
-
198
-	/**
199
-	 * see https://www.php.net/manual/en/function.file_exists.php
200
-	 *
201
-	 * @param string $path
202
-	 * @return bool
203
-	 * @since 6.0.0
204
-	 */
205
-	public function file_exists($path);
206
-
207
-	/**
208
-	 * see https://www.php.net/manual/en/function.filemtime.php
209
-	 *
210
-	 * @param string $path
211
-	 * @return int|bool
212
-	 * @since 6.0.0
213
-	 */
214
-	public function filemtime($path);
215
-
216
-	/**
217
-	 * see https://www.php.net/manual/en/function.file_get_contents.php
218
-	 *
219
-	 * @param string $path
220
-	 * @return string|bool
221
-	 * @since 6.0.0
222
-	 */
223
-	public function file_get_contents($path);
224
-
225
-	/**
226
-	 * see https://www.php.net/manual/en/function.file_put_contents.php
227
-	 *
228
-	 * @param string $path
229
-	 * @param mixed $data
230
-	 * @return int|false
231
-	 * @since 6.0.0
232
-	 */
233
-	public function file_put_contents($path, $data);
234
-
235
-	/**
236
-	 * see https://www.php.net/manual/en/function.unlink.php
237
-	 *
238
-	 * @param string $path
239
-	 * @return bool
240
-	 * @since 6.0.0
241
-	 */
242
-	public function unlink($path);
243
-
244
-	/**
245
-	 * see https://www.php.net/manual/en/function.rename.php
246
-	 *
247
-	 * @param string $source
248
-	 * @param string $target
249
-	 * @return bool
250
-	 * @since 6.0.0
251
-	 */
252
-	public function rename($source, $target);
253
-
254
-	/**
255
-	 * see https://www.php.net/manual/en/function.copy.php
256
-	 *
257
-	 * @param string $soruce
258
-	 * @param string $target
259
-	 * @return bool
260
-	 * @since 6.0.0
261
-	 */
262
-	public function copy($source, $target);
263
-
264
-	/**
265
-	 * see https://www.php.net/manual/en/function.fopen.php
266
-	 *
267
-	 * @param string $path
268
-	 * @param string $mode
269
-	 * @return resource|bool
270
-	 * @since 6.0.0
271
-	 */
272
-	public function fopen($path, $mode);
273
-
274
-	/**
275
-	 * get the mimetype for a file or folder
276
-	 * The mimetype for a folder is required to be "httpd/unix-directory"
277
-	 *
278
-	 * @param string $path
279
-	 * @return string|bool
280
-	 * @since 6.0.0
281
-	 */
282
-	public function getMimeType($path);
283
-
284
-	/**
285
-	 * see https://www.php.net/manual/en/function.hash-file.php
286
-	 *
287
-	 * @param string $type
288
-	 * @param string $path
289
-	 * @param bool $raw
290
-	 * @return string|bool
291
-	 * @since 6.0.0
292
-	 */
293
-	public function hash($type, $path, $raw = false);
294
-
295
-	/**
296
-	 * see https://www.php.net/manual/en/function.disk-free-space.php
297
-	 *
298
-	 * @param string $path
299
-	 * @return int|bool
300
-	 * @since 6.0.0
301
-	 */
302
-	public function free_space($path);
303
-
304
-	/**
305
-	 * search for occurrences of $query in file names
306
-	 *
307
-	 * @param string $query
308
-	 * @return array|bool
309
-	 * @since 6.0.0
310
-	 */
311
-	public function search($query);
312
-
313
-	/**
314
-	 * see https://www.php.net/manual/en/function.touch.php
315
-	 * If the backend does not support the operation, false should be returned
316
-	 *
317
-	 * @param string $path
318
-	 * @param int $mtime
319
-	 * @return bool
320
-	 * @since 6.0.0
321
-	 */
322
-	public function touch($path, $mtime = null);
323
-
324
-	/**
325
-	 * get the path to a local version of the file.
326
-	 * The local version of the file can be temporary and doesn't have to be persistent across requests
327
-	 *
328
-	 * @param string $path
329
-	 * @return string|bool
330
-	 * @since 6.0.0
331
-	 */
332
-	public function getLocalFile($path);
333
-
334
-	/**
335
-	 * check if a file or folder has been updated since $time
336
-	 *
337
-	 * @param string $path
338
-	 * @param int $time
339
-	 * @return bool
340
-	 * @since 6.0.0
341
-	 *
342
-	 * hasUpdated for folders should return at least true if a file inside the folder is add, removed or renamed.
343
-	 * returning true for other changes in the folder is optional
344
-	 */
345
-	public function hasUpdated($path, $time);
346
-
347
-	/**
348
-	 * get the ETag for a file or folder
349
-	 *
350
-	 * @param string $path
351
-	 * @return string|bool
352
-	 * @since 6.0.0
353
-	 */
354
-	public function getETag($path);
355
-
356
-	/**
357
-	 * Returns whether the storage is local, which means that files
358
-	 * are stored on the local filesystem instead of remotely.
359
-	 * Calling getLocalFile() for local storages should always
360
-	 * return the local files, whereas for non-local storages
361
-	 * it might return a temporary file.
362
-	 *
363
-	 * @return bool true if the files are stored locally, false otherwise
364
-	 * @since 7.0.0
365
-	 */
366
-	public function isLocal();
367
-
368
-	/**
369
-	 * Check if the storage is an instance of $class or is a wrapper for a storage that is an instance of $class
370
-	 *
371
-	 * @template T of IStorage
372
-	 * @param string $class
373
-	 * @psalm-param class-string<T> $class
374
-	 * @return bool
375
-	 * @since 7.0.0
376
-	 * @psalm-assert-if-true T $this
377
-	 */
378
-	public function instanceOfStorage($class);
379
-
380
-	/**
381
-	 * A custom storage implementation can return an url for direct download of a give file.
382
-	 *
383
-	 * For now the returned array can hold the parameter url - in future more attributes might follow.
384
-	 *
385
-	 * @param string $path
386
-	 * @return array|bool
387
-	 * @since 8.0.0
388
-	 */
389
-	public function getDirectDownload($path);
390
-
391
-	/**
392
-	 * @param string $path the path of the target folder
393
-	 * @param string $fileName the name of the file itself
394
-	 * @return void
395
-	 * @throws InvalidPathException
396
-	 * @since 8.1.0
397
-	 */
398
-	public function verifyPath($path, $fileName);
399
-
400
-	/**
401
-	 * @param IStorage $sourceStorage
402
-	 * @param string $sourceInternalPath
403
-	 * @param string $targetInternalPath
404
-	 * @return bool
405
-	 * @since 8.1.0
406
-	 */
407
-	public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath);
408
-
409
-	/**
410
-	 * @param IStorage $sourceStorage
411
-	 * @param string $sourceInternalPath
412
-	 * @param string $targetInternalPath
413
-	 * @return bool
414
-	 * @since 8.1.0
415
-	 */
416
-	public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath);
417
-
418
-	/**
419
-	 * @param string $path The path of the file to acquire the lock for
420
-	 * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
421
-	 * @param \OCP\Lock\ILockingProvider $provider
422
-	 * @throws \OCP\Lock\LockedException
423
-	 * @since 8.1.0
424
-	 */
425
-	public function acquireLock($path, $type, ILockingProvider $provider);
426
-
427
-	/**
428
-	 * @param string $path The path of the file to acquire the lock for
429
-	 * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
430
-	 * @param \OCP\Lock\ILockingProvider $provider
431
-	 * @throws \OCP\Lock\LockedException
432
-	 * @since 8.1.0
433
-	 */
434
-	public function releaseLock($path, $type, ILockingProvider $provider);
435
-
436
-	/**
437
-	 * @param string $path The path of the file to change the lock for
438
-	 * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
439
-	 * @param \OCP\Lock\ILockingProvider $provider
440
-	 * @throws \OCP\Lock\LockedException
441
-	 * @since 8.1.0
442
-	 */
443
-	public function changeLock($path, $type, ILockingProvider $provider);
444
-
445
-	/**
446
-	 * Test a storage for availability
447
-	 *
448
-	 * @since 8.2.0
449
-	 * @return bool
450
-	 */
451
-	public function test();
452
-
453
-	/**
454
-	 * @since 8.2.0
455
-	 * @return array [ available, last_checked ]
456
-	 */
457
-	public function getAvailability();
458
-
459
-	/**
460
-	 * @since 8.2.0
461
-	 * @param bool $isAvailable
462
-	 */
463
-	public function setAvailability($isAvailable);
464
-
465
-	/**
466
-	 * @since 12.0.0
467
-	 * @return mixed
468
-	 */
469
-	public function needsPartFile();
50
+    /**
51
+     * $parameters is a free form array with the configuration options needed to construct the storage
52
+     *
53
+     * @param array $parameters
54
+     * @since 6.0.0
55
+     */
56
+    public function __construct($parameters);
57
+
58
+    /**
59
+     * Get the identifier for the storage,
60
+     * the returned id should be the same for every storage object that is created with the same parameters
61
+     * and two storage objects with the same id should refer to two storages that display the same files.
62
+     *
63
+     * @return string
64
+     * @since 6.0.0
65
+     */
66
+    public function getId();
67
+
68
+    /**
69
+     * see https://www.php.net/manual/en/function.mkdir.php
70
+     * implementations need to implement a recursive mkdir
71
+     *
72
+     * @param string $path
73
+     * @return bool
74
+     * @since 6.0.0
75
+     */
76
+    public function mkdir($path);
77
+
78
+    /**
79
+     * see https://www.php.net/manual/en/function.rmdir.php
80
+     *
81
+     * @param string $path
82
+     * @return bool
83
+     * @since 6.0.0
84
+     */
85
+    public function rmdir($path);
86
+
87
+    /**
88
+     * see https://www.php.net/manual/en/function.opendir.php
89
+     *
90
+     * @param string $path
91
+     * @return resource|bool
92
+     * @since 6.0.0
93
+     */
94
+    public function opendir($path);
95
+
96
+    /**
97
+     * see https://www.php.net/manual/en/function.is-dir.php
98
+     *
99
+     * @param string $path
100
+     * @return bool
101
+     * @since 6.0.0
102
+     */
103
+    public function is_dir($path);
104
+
105
+    /**
106
+     * see https://www.php.net/manual/en/function.is-file.php
107
+     *
108
+     * @param string $path
109
+     * @return bool
110
+     * @since 6.0.0
111
+     */
112
+    public function is_file($path);
113
+
114
+    /**
115
+     * see https://www.php.net/manual/en/function.stat.php
116
+     * only the following keys are required in the result: size and mtime
117
+     *
118
+     * @param string $path
119
+     * @return array|bool
120
+     * @since 6.0.0
121
+     */
122
+    public function stat($path);
123
+
124
+    /**
125
+     * see https://www.php.net/manual/en/function.filetype.php
126
+     *
127
+     * @param string $path
128
+     * @return string|bool
129
+     * @since 6.0.0
130
+     */
131
+    public function filetype($path);
132
+
133
+    /**
134
+     * see https://www.php.net/manual/en/function.filesize.php
135
+     * The result for filesize when called on a folder is required to be 0
136
+     *
137
+     * @param string $path
138
+     * @return int|bool
139
+     * @since 6.0.0
140
+     */
141
+    public function filesize($path);
142
+
143
+    /**
144
+     * check if a file can be created in $path
145
+     *
146
+     * @param string $path
147
+     * @return bool
148
+     * @since 6.0.0
149
+     */
150
+    public function isCreatable($path);
151
+
152
+    /**
153
+     * check if a file can be read
154
+     *
155
+     * @param string $path
156
+     * @return bool
157
+     * @since 6.0.0
158
+     */
159
+    public function isReadable($path);
160
+
161
+    /**
162
+     * check if a file can be written to
163
+     *
164
+     * @param string $path
165
+     * @return bool
166
+     * @since 6.0.0
167
+     */
168
+    public function isUpdatable($path);
169
+
170
+    /**
171
+     * check if a file can be deleted
172
+     *
173
+     * @param string $path
174
+     * @return bool
175
+     * @since 6.0.0
176
+     */
177
+    public function isDeletable($path);
178
+
179
+    /**
180
+     * check if a file can be shared
181
+     *
182
+     * @param string $path
183
+     * @return bool
184
+     * @since 6.0.0
185
+     */
186
+    public function isSharable($path);
187
+
188
+    /**
189
+     * get the full permissions of a path.
190
+     * Should return a combination of the PERMISSION_ constants defined in lib/public/constants.php
191
+     *
192
+     * @param string $path
193
+     * @return int
194
+     * @since 6.0.0
195
+     */
196
+    public function getPermissions($path);
197
+
198
+    /**
199
+     * see https://www.php.net/manual/en/function.file_exists.php
200
+     *
201
+     * @param string $path
202
+     * @return bool
203
+     * @since 6.0.0
204
+     */
205
+    public function file_exists($path);
206
+
207
+    /**
208
+     * see https://www.php.net/manual/en/function.filemtime.php
209
+     *
210
+     * @param string $path
211
+     * @return int|bool
212
+     * @since 6.0.0
213
+     */
214
+    public function filemtime($path);
215
+
216
+    /**
217
+     * see https://www.php.net/manual/en/function.file_get_contents.php
218
+     *
219
+     * @param string $path
220
+     * @return string|bool
221
+     * @since 6.0.0
222
+     */
223
+    public function file_get_contents($path);
224
+
225
+    /**
226
+     * see https://www.php.net/manual/en/function.file_put_contents.php
227
+     *
228
+     * @param string $path
229
+     * @param mixed $data
230
+     * @return int|false
231
+     * @since 6.0.0
232
+     */
233
+    public function file_put_contents($path, $data);
234
+
235
+    /**
236
+     * see https://www.php.net/manual/en/function.unlink.php
237
+     *
238
+     * @param string $path
239
+     * @return bool
240
+     * @since 6.0.0
241
+     */
242
+    public function unlink($path);
243
+
244
+    /**
245
+     * see https://www.php.net/manual/en/function.rename.php
246
+     *
247
+     * @param string $source
248
+     * @param string $target
249
+     * @return bool
250
+     * @since 6.0.0
251
+     */
252
+    public function rename($source, $target);
253
+
254
+    /**
255
+     * see https://www.php.net/manual/en/function.copy.php
256
+     *
257
+     * @param string $soruce
258
+     * @param string $target
259
+     * @return bool
260
+     * @since 6.0.0
261
+     */
262
+    public function copy($source, $target);
263
+
264
+    /**
265
+     * see https://www.php.net/manual/en/function.fopen.php
266
+     *
267
+     * @param string $path
268
+     * @param string $mode
269
+     * @return resource|bool
270
+     * @since 6.0.0
271
+     */
272
+    public function fopen($path, $mode);
273
+
274
+    /**
275
+     * get the mimetype for a file or folder
276
+     * The mimetype for a folder is required to be "httpd/unix-directory"
277
+     *
278
+     * @param string $path
279
+     * @return string|bool
280
+     * @since 6.0.0
281
+     */
282
+    public function getMimeType($path);
283
+
284
+    /**
285
+     * see https://www.php.net/manual/en/function.hash-file.php
286
+     *
287
+     * @param string $type
288
+     * @param string $path
289
+     * @param bool $raw
290
+     * @return string|bool
291
+     * @since 6.0.0
292
+     */
293
+    public function hash($type, $path, $raw = false);
294
+
295
+    /**
296
+     * see https://www.php.net/manual/en/function.disk-free-space.php
297
+     *
298
+     * @param string $path
299
+     * @return int|bool
300
+     * @since 6.0.0
301
+     */
302
+    public function free_space($path);
303
+
304
+    /**
305
+     * search for occurrences of $query in file names
306
+     *
307
+     * @param string $query
308
+     * @return array|bool
309
+     * @since 6.0.0
310
+     */
311
+    public function search($query);
312
+
313
+    /**
314
+     * see https://www.php.net/manual/en/function.touch.php
315
+     * If the backend does not support the operation, false should be returned
316
+     *
317
+     * @param string $path
318
+     * @param int $mtime
319
+     * @return bool
320
+     * @since 6.0.0
321
+     */
322
+    public function touch($path, $mtime = null);
323
+
324
+    /**
325
+     * get the path to a local version of the file.
326
+     * The local version of the file can be temporary and doesn't have to be persistent across requests
327
+     *
328
+     * @param string $path
329
+     * @return string|bool
330
+     * @since 6.0.0
331
+     */
332
+    public function getLocalFile($path);
333
+
334
+    /**
335
+     * check if a file or folder has been updated since $time
336
+     *
337
+     * @param string $path
338
+     * @param int $time
339
+     * @return bool
340
+     * @since 6.0.0
341
+     *
342
+     * hasUpdated for folders should return at least true if a file inside the folder is add, removed or renamed.
343
+     * returning true for other changes in the folder is optional
344
+     */
345
+    public function hasUpdated($path, $time);
346
+
347
+    /**
348
+     * get the ETag for a file or folder
349
+     *
350
+     * @param string $path
351
+     * @return string|bool
352
+     * @since 6.0.0
353
+     */
354
+    public function getETag($path);
355
+
356
+    /**
357
+     * Returns whether the storage is local, which means that files
358
+     * are stored on the local filesystem instead of remotely.
359
+     * Calling getLocalFile() for local storages should always
360
+     * return the local files, whereas for non-local storages
361
+     * it might return a temporary file.
362
+     *
363
+     * @return bool true if the files are stored locally, false otherwise
364
+     * @since 7.0.0
365
+     */
366
+    public function isLocal();
367
+
368
+    /**
369
+     * Check if the storage is an instance of $class or is a wrapper for a storage that is an instance of $class
370
+     *
371
+     * @template T of IStorage
372
+     * @param string $class
373
+     * @psalm-param class-string<T> $class
374
+     * @return bool
375
+     * @since 7.0.0
376
+     * @psalm-assert-if-true T $this
377
+     */
378
+    public function instanceOfStorage($class);
379
+
380
+    /**
381
+     * A custom storage implementation can return an url for direct download of a give file.
382
+     *
383
+     * For now the returned array can hold the parameter url - in future more attributes might follow.
384
+     *
385
+     * @param string $path
386
+     * @return array|bool
387
+     * @since 8.0.0
388
+     */
389
+    public function getDirectDownload($path);
390
+
391
+    /**
392
+     * @param string $path the path of the target folder
393
+     * @param string $fileName the name of the file itself
394
+     * @return void
395
+     * @throws InvalidPathException
396
+     * @since 8.1.0
397
+     */
398
+    public function verifyPath($path, $fileName);
399
+
400
+    /**
401
+     * @param IStorage $sourceStorage
402
+     * @param string $sourceInternalPath
403
+     * @param string $targetInternalPath
404
+     * @return bool
405
+     * @since 8.1.0
406
+     */
407
+    public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath);
408
+
409
+    /**
410
+     * @param IStorage $sourceStorage
411
+     * @param string $sourceInternalPath
412
+     * @param string $targetInternalPath
413
+     * @return bool
414
+     * @since 8.1.0
415
+     */
416
+    public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath);
417
+
418
+    /**
419
+     * @param string $path The path of the file to acquire the lock for
420
+     * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
421
+     * @param \OCP\Lock\ILockingProvider $provider
422
+     * @throws \OCP\Lock\LockedException
423
+     * @since 8.1.0
424
+     */
425
+    public function acquireLock($path, $type, ILockingProvider $provider);
426
+
427
+    /**
428
+     * @param string $path The path of the file to acquire the lock for
429
+     * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
430
+     * @param \OCP\Lock\ILockingProvider $provider
431
+     * @throws \OCP\Lock\LockedException
432
+     * @since 8.1.0
433
+     */
434
+    public function releaseLock($path, $type, ILockingProvider $provider);
435
+
436
+    /**
437
+     * @param string $path The path of the file to change the lock for
438
+     * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
439
+     * @param \OCP\Lock\ILockingProvider $provider
440
+     * @throws \OCP\Lock\LockedException
441
+     * @since 8.1.0
442
+     */
443
+    public function changeLock($path, $type, ILockingProvider $provider);
444
+
445
+    /**
446
+     * Test a storage for availability
447
+     *
448
+     * @since 8.2.0
449
+     * @return bool
450
+     */
451
+    public function test();
452
+
453
+    /**
454
+     * @since 8.2.0
455
+     * @return array [ available, last_checked ]
456
+     */
457
+    public function getAvailability();
458
+
459
+    /**
460
+     * @since 8.2.0
461
+     * @param bool $isAvailable
462
+     */
463
+    public function setAvailability($isAvailable);
464
+
465
+    /**
466
+     * @since 12.0.0
467
+     * @return mixed
468
+     */
469
+    public function needsPartFile();
470 470
 }
Please login to merge, or discard this patch.
lib/public/Group/Backend/ABackend.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -31,38 +31,38 @@
 block discarded – undo
31 31
  * @since 14.0.0
32 32
  */
33 33
 abstract class ABackend implements GroupInterface {
34
-	/**
35
-	 * @deprecated 14.0.0
36
-	 * @since 14.0.0
37
-	 *
38
-	 * @param int $actions The action to check for
39
-	 * @return bool
40
-	 */
41
-	public function implementsActions($actions): bool {
42
-		$implements = 0;
34
+    /**
35
+     * @deprecated 14.0.0
36
+     * @since 14.0.0
37
+     *
38
+     * @param int $actions The action to check for
39
+     * @return bool
40
+     */
41
+    public function implementsActions($actions): bool {
42
+        $implements = 0;
43 43
 
44
-		if ($this instanceof IAddToGroupBackend) {
45
-			$implements |= GroupInterface::ADD_TO_GROUP;
46
-		}
47
-		if ($this instanceof ICountUsersBackend) {
48
-			$implements |= GroupInterface::COUNT_USERS;
49
-		}
50
-		if ($this instanceof ICreateGroupBackend) {
51
-			$implements |= GroupInterface::CREATE_GROUP;
52
-		}
53
-		if ($this instanceof IDeleteGroupBackend) {
54
-			$implements |= GroupInterface::DELETE_GROUP;
55
-		}
56
-		if ($this instanceof IGroupDetailsBackend) {
57
-			$implements |= GroupInterface::GROUP_DETAILS;
58
-		}
59
-		if ($this instanceof IIsAdminBackend) {
60
-			$implements |= GroupInterface::IS_ADMIN;
61
-		}
62
-		if ($this instanceof IRemoveFromGroupBackend) {
63
-			$implements |= GroupInterface::REMOVE_FROM_GOUP;
64
-		}
44
+        if ($this instanceof IAddToGroupBackend) {
45
+            $implements |= GroupInterface::ADD_TO_GROUP;
46
+        }
47
+        if ($this instanceof ICountUsersBackend) {
48
+            $implements |= GroupInterface::COUNT_USERS;
49
+        }
50
+        if ($this instanceof ICreateGroupBackend) {
51
+            $implements |= GroupInterface::CREATE_GROUP;
52
+        }
53
+        if ($this instanceof IDeleteGroupBackend) {
54
+            $implements |= GroupInterface::DELETE_GROUP;
55
+        }
56
+        if ($this instanceof IGroupDetailsBackend) {
57
+            $implements |= GroupInterface::GROUP_DETAILS;
58
+        }
59
+        if ($this instanceof IIsAdminBackend) {
60
+            $implements |= GroupInterface::IS_ADMIN;
61
+        }
62
+        if ($this instanceof IRemoveFromGroupBackend) {
63
+            $implements |= GroupInterface::REMOVE_FROM_GOUP;
64
+        }
65 65
 
66
-		return (bool)($actions & $implements);
67
-	}
66
+        return (bool)($actions & $implements);
67
+    }
68 68
 }
Please login to merge, or discard this patch.
lib/public/User/Backend/ABackend.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -34,41 +34,41 @@
 block discarded – undo
34 34
  * @since 14.0.0
35 35
  */
36 36
 abstract class ABackend implements IUserBackend, UserInterface {
37
-	/**
38
-	 * @deprecated 14.0.0
39
-	 * @since 14.0.0
40
-	 *
41
-	 * @param int $actions The action to check for
42
-	 * @return bool
43
-	 */
44
-	public function implementsActions($actions): bool {
45
-		$implements = 0;
37
+    /**
38
+     * @deprecated 14.0.0
39
+     * @since 14.0.0
40
+     *
41
+     * @param int $actions The action to check for
42
+     * @return bool
43
+     */
44
+    public function implementsActions($actions): bool {
45
+        $implements = 0;
46 46
 
47
-		if ($this instanceof ICreateUserBackend) {
48
-			$implements |= Backend::CREATE_USER;
49
-		}
50
-		if ($this instanceof ISetPasswordBackend) {
51
-			$implements |= Backend::SET_PASSWORD;
52
-		}
53
-		if ($this instanceof ICheckPasswordBackend) {
54
-			$implements |= Backend::CHECK_PASSWORD;
55
-		}
56
-		if ($this instanceof IGetHomeBackend) {
57
-			$implements |= Backend::GET_HOME;
58
-		}
59
-		if ($this instanceof IGetDisplayNameBackend) {
60
-			$implements |= Backend::GET_DISPLAYNAME;
61
-		}
62
-		if ($this instanceof ISetDisplayNameBackend) {
63
-			$implements |= Backend::SET_DISPLAYNAME;
64
-		}
65
-		if ($this instanceof IProvideAvatarBackend) {
66
-			$implements |= Backend::PROVIDE_AVATAR;
67
-		}
68
-		if ($this instanceof ICountUsersBackend) {
69
-			$implements |= Backend::COUNT_USERS;
70
-		}
47
+        if ($this instanceof ICreateUserBackend) {
48
+            $implements |= Backend::CREATE_USER;
49
+        }
50
+        if ($this instanceof ISetPasswordBackend) {
51
+            $implements |= Backend::SET_PASSWORD;
52
+        }
53
+        if ($this instanceof ICheckPasswordBackend) {
54
+            $implements |= Backend::CHECK_PASSWORD;
55
+        }
56
+        if ($this instanceof IGetHomeBackend) {
57
+            $implements |= Backend::GET_HOME;
58
+        }
59
+        if ($this instanceof IGetDisplayNameBackend) {
60
+            $implements |= Backend::GET_DISPLAYNAME;
61
+        }
62
+        if ($this instanceof ISetDisplayNameBackend) {
63
+            $implements |= Backend::SET_DISPLAYNAME;
64
+        }
65
+        if ($this instanceof IProvideAvatarBackend) {
66
+            $implements |= Backend::PROVIDE_AVATAR;
67
+        }
68
+        if ($this instanceof ICountUsersBackend) {
69
+            $implements |= Backend::COUNT_USERS;
70
+        }
71 71
 
72
-		return (bool)($actions & $implements);
73
-	}
72
+        return (bool)($actions & $implements);
73
+    }
74 74
 }
Please login to merge, or discard this patch.