Completed
Push — master ( 0274a4...fb0b56 )
by
unknown
47:02 queued 06:53
created
apps/files_sharing/lib/SharedStorage.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 				// this is probably because some code path has caused recursion during the share setup
136 136
 				// we setup a "failed storage" so `getWrapperStorage` doesn't return null.
137 137
 				// If the share setup completes after this the "failed storage" will be overwritten by the correct one
138
-				$ex = new \Exception('Possible share setup recursion detected for share ' . $this->superShare->getId());
138
+				$ex = new \Exception('Possible share setup recursion detected for share '.$this->superShare->getId());
139 139
 				$this->logger->warning($ex->getMessage(), ['exception' => $ex, 'app' => 'files_sharing']);
140 140
 				$this->storage = new FailedStorage(['exception' => $ex]);
141 141
 				$this->cache = new FailedCache();
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	}
238 238
 
239 239
 	public function getId(): string {
240
-		return 'shared::' . $this->getMountPoint();
240
+		return 'shared::'.$this->getMountPoint();
241 241
 	}
242 242
 
243 243
 	public function getPermissions(string $path = ''): int {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	}
260 260
 
261 261
 	public function isCreatable(string $path): bool {
262
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_CREATE);
262
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_CREATE);
263 263
 	}
264 264
 
265 265
 	public function isReadable(string $path): bool {
@@ -276,18 +276,18 @@  discard block
 block discarded – undo
276 276
 	}
277 277
 
278 278
 	public function isUpdatable(string $path): bool {
279
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_UPDATE);
279
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_UPDATE);
280 280
 	}
281 281
 
282 282
 	public function isDeletable(string $path): bool {
283
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_DELETE);
283
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_DELETE);
284 284
 	}
285 285
 
286 286
 	public function isSharable(string $path): bool {
287 287
 		if (Util::isSharingDisabledForUser() || !Share::isResharingAllowed()) {
288 288
 			return false;
289 289
 		}
290
-		return (bool)($this->getPermissions($path) & Constants::PERMISSION_SHARE);
290
+		return (bool) ($this->getPermissions($path) & Constants::PERMISSION_SHARE);
291 291
 	}
292 292
 
293 293
 	public function fopen(string $path, string $mode) {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 				}
335 335
 		}
336 336
 		$info = [
337
-			'target' => $this->getMountPoint() . '/' . $path,
337
+			'target' => $this->getMountPoint().'/'.$path,
338 338
 			'source' => $source,
339 339
 			'mode' => $mode,
340 340
 		];
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 		return new Scanner($storage);
429 429
 	}
430 430
 
431
-	public function getOwner(string $path): string|false {
431
+	public function getOwner(string $path): string | false {
432 432
 		return $this->superShare->getShareOwner();
433 433
 	}
434 434
 
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 		 * @psalm-suppress DocblockTypeContradiction
523 523
 		 */
524 524
 		if (!$this->storage) {
525
-			$message = 'no storage set after init for share ' . $this->getShareId();
525
+			$message = 'no storage set after init for share '.$this->getShareId();
526 526
 			$this->logger->error($message);
527 527
 			$this->storage = new FailedStorage(['exception' => new \Exception($message)]);
528 528
 		}
@@ -530,18 +530,18 @@  discard block
 block discarded – undo
530 530
 		return $this->storage;
531 531
 	}
532 532
 
533
-	public function file_get_contents(string $path): string|false {
533
+	public function file_get_contents(string $path): string | false {
534 534
 		$info = [
535
-			'target' => $this->getMountPoint() . '/' . $path,
535
+			'target' => $this->getMountPoint().'/'.$path,
536 536
 			'source' => $this->getUnjailedPath($path),
537 537
 		];
538 538
 		Util::emitHook('\OC\Files\Storage\Shared', 'file_get_contents', $info);
539 539
 		return parent::file_get_contents($path);
540 540
 	}
541 541
 
542
-	public function file_put_contents(string $path, mixed $data): int|float|false {
542
+	public function file_put_contents(string $path, mixed $data): int | float | false {
543 543
 		$info = [
544
-			'target' => $this->getMountPoint() . '/' . $path,
544
+			'target' => $this->getMountPoint().'/'.$path,
545 545
 			'source' => $this->getUnjailedPath($path),
546 546
 		];
547 547
 		Util::emitHook('\OC\Files\Storage\Shared', 'file_put_contents', $info);
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 		return parent::getUnjailedPath($path);
559 559
 	}
560 560
 
561
-	public function getDirectDownload(string $path): array|false {
561
+	public function getDirectDownload(string $path): array | false {
562 562
 		// disable direct download for shares
563 563
 		return [];
564 564
 	}
Please login to merge, or discard this patch.