Passed
Push — master ( 80e12c...127af0 )
by Julius
15:15 queued 16s
created
apps/files_sharing/lib/Controller/DeletedShareAPIController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
 
184 184
 		$shares = array_merge($groupShares, $roomShares, $deckShares, $sciencemeshShares);
185 185
 
186
-		$shares = array_map(function (IShare $share) {
186
+		$shares = array_map(function(IShare $share) {
187 187
 			return $this->formatShare($share);
188 188
 		}, $shares);
189 189
 
Please login to merge, or discard this patch.
apps/files_sharing/lib/Controller/ShareAPIController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 					'message' => $userStatus->getMessage(),
254 254
 					'icon' => $userStatus->getIcon(),
255 255
 					'clearAt' => $userStatus->getClearAt()
256
-						? (int)$userStatus->getClearAt()->format('U')
256
+						? (int) $userStatus->getClearAt()->format('U')
257 257
 						: null,
258 258
 				];
259 259
 			}
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 			// "share_with" and "share_with_displayname" for passwords of link
267 267
 			// shares was deprecated in Nextcloud 15, use "password" instead.
268 268
 			$result['share_with'] = $share->getPassword();
269
-			$result['share_with_displayname'] = '(' . $this->l->t('Shared link') . ')';
269
+			$result['share_with_displayname'] = '('.$this->l->t('Shared link').')';
270 270
 
271 271
 			$result['password'] = $share->getPassword();
272 272
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
 		$result['attributes'] = null;
338 338
 		if ($attributes = $share->getAttributes()) {
339
-			$result['attributes'] =  \json_encode($attributes->toArray());
339
+			$result['attributes'] = \json_encode($attributes->toArray());
340 340
 		}
341 341
 
342 342
 		return $result;
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 				// to keep legacy default behaviour, we ignore the setting below for link shares
493 493
 				$permissions = Constants::PERMISSION_READ;
494 494
 			} else {
495
-				$permissions = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', (string)Constants::PERMISSION_ALL);
495
+				$permissions = (int) $this->config->getAppValue('core', 'shareapi_default_permissions', (string) Constants::PERMISSION_ALL);
496 496
 			}
497 497
 		}
498 498
 
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
 
749 749
 		$shares = array_merge($userShares, $groupShares, $circleShares, $roomShares, $deckShares, $sciencemeshShares);
750 750
 
751
-		$filteredShares = array_filter($shares, function (IShare $share) {
751
+		$filteredShares = array_filter($shares, function(IShare $share) {
752 752
 			return $share->getShareOwner() !== $this->currentUser;
753 753
 		});
754 754
 
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 		$nodes = $folder->getDirectoryListing();
786 786
 
787 787
 		/** @var \OCP\Share\IShare[] $shares */
788
-		$shares = array_reduce($nodes, function ($carry, $node) {
788
+		$shares = array_reduce($nodes, function($carry, $node) {
789 789
 			$carry = array_merge($carry, $this->getAllShares($node, true));
790 790
 			return $carry;
791 791
 		}, []);
@@ -1273,7 +1273,7 @@  discard block
 block discarded – undo
1273 1273
 			$share = $this->shareManager->updateShare($share);
1274 1274
 		} catch (GenericShareException $e) {
1275 1275
 			$code = $e->getCode() === 0 ? 403 : $e->getCode();
1276
-			throw new OCSException($e->getHint(), (int)$code);
1276
+			throw new OCSException($e->getHint(), (int) $code);
1277 1277
 		} catch (\Exception $e) {
1278 1278
 			throw new OCSBadRequestException($e->getMessage(), $e);
1279 1279
 		}
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
 			}
1303 1303
 		}
1304 1304
 
1305
-		$result = array_filter(array_map(function (IShare $share) {
1305
+		$result = array_filter(array_map(function(IShare $share) {
1306 1306
 			$userFolder = $this->rootFolder->getUserFolder($share->getSharedBy());
1307 1307
 			$nodes = $userFolder->getById($share->getNodeId());
1308 1308
 			if (empty($nodes)) {
@@ -1324,7 +1324,7 @@  discard block
 block discarded – undo
1324 1324
 			} catch (NotFoundException $e) {
1325 1325
 				return null;
1326 1326
 			}
1327
-		}, $pendingShares), function ($entry) {
1327
+		}, $pendingShares), function($entry) {
1328 1328
 			return $entry !== null;
1329 1329
 		});
1330 1330
 
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
 			$this->shareManager->acceptShare($share, $this->currentUser);
1356 1356
 		} catch (GenericShareException $e) {
1357 1357
 			$code = $e->getCode() === 0 ? 403 : $e->getCode();
1358
-			throw new OCSException($e->getHint(), (int)$code);
1358
+			throw new OCSException($e->getHint(), (int) $code);
1359 1359
 		} catch (\Exception $e) {
1360 1360
 			throw new OCSBadRequestException($e->getMessage(), $e);
1361 1361
 		}
@@ -1597,7 +1597,7 @@  discard block
 block discarded – undo
1597 1597
 
1598 1598
 		// First check if it is an internal share.
1599 1599
 		try {
1600
-			$share = $this->shareManager->getShareById('ocinternal:' . $id, $this->currentUser);
1600
+			$share = $this->shareManager->getShareById('ocinternal:'.$id, $this->currentUser);
1601 1601
 			return $share;
1602 1602
 		} catch (ShareNotFound $e) {
1603 1603
 			// Do nothing, just try the other share type
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
 
1607 1607
 		try {
1608 1608
 			if ($this->shareManager->shareProviderExists(IShare::TYPE_CIRCLE)) {
1609
-				$share = $this->shareManager->getShareById('ocCircleShare:' . $id, $this->currentUser);
1609
+				$share = $this->shareManager->getShareById('ocCircleShare:'.$id, $this->currentUser);
1610 1610
 				return $share;
1611 1611
 			}
1612 1612
 		} catch (ShareNotFound $e) {
@@ -1615,7 +1615,7 @@  discard block
 block discarded – undo
1615 1615
 
1616 1616
 		try {
1617 1617
 			if ($this->shareManager->shareProviderExists(IShare::TYPE_EMAIL)) {
1618
-				$share = $this->shareManager->getShareById('ocMailShare:' . $id, $this->currentUser);
1618
+				$share = $this->shareManager->getShareById('ocMailShare:'.$id, $this->currentUser);
1619 1619
 				return $share;
1620 1620
 			}
1621 1621
 		} catch (ShareNotFound $e) {
@@ -1623,7 +1623,7 @@  discard block
 block discarded – undo
1623 1623
 		}
1624 1624
 
1625 1625
 		try {
1626
-			$share = $this->shareManager->getShareById('ocRoomShare:' . $id, $this->currentUser);
1626
+			$share = $this->shareManager->getShareById('ocRoomShare:'.$id, $this->currentUser);
1627 1627
 			return $share;
1628 1628
 		} catch (ShareNotFound $e) {
1629 1629
 			// Do nothing, just try the other share type
@@ -1631,7 +1631,7 @@  discard block
 block discarded – undo
1631 1631
 
1632 1632
 		try {
1633 1633
 			if ($this->shareManager->shareProviderExists(IShare::TYPE_DECK)) {
1634
-				$share = $this->shareManager->getShareById('deck:' . $id, $this->currentUser);
1634
+				$share = $this->shareManager->getShareById('deck:'.$id, $this->currentUser);
1635 1635
 				return $share;
1636 1636
 			}
1637 1637
 		} catch (ShareNotFound $e) {
@@ -1640,7 +1640,7 @@  discard block
 block discarded – undo
1640 1640
 
1641 1641
 		try {
1642 1642
 			if ($this->shareManager->shareProviderExists(IShare::TYPE_SCIENCEMESH)) {
1643
-				$share = $this->shareManager->getShareById('sciencemesh:' . $id, $this->currentUser);
1643
+				$share = $this->shareManager->getShareById('sciencemesh:'.$id, $this->currentUser);
1644 1644
 				return $share;
1645 1645
 			}
1646 1646
 		} catch (ShareNotFound $e) {
@@ -1650,7 +1650,7 @@  discard block
 block discarded – undo
1650 1650
 		if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) {
1651 1651
 			throw new ShareNotFound();
1652 1652
 		}
1653
-		$share = $this->shareManager->getShareById('ocFederatedSharing:' . $id, $this->currentUser);
1653
+		$share = $this->shareManager->getShareById('ocFederatedSharing:'.$id, $this->currentUser);
1654 1654
 
1655 1655
 		return $share;
1656 1656
 	}
@@ -1953,7 +1953,7 @@  discard block
 block discarded – undo
1953 1953
 					);
1954 1954
 				}
1955 1955
 			} else {
1956
-				throw new OCSBadRequestException('Invalid share attributes provided: \"' . $attributesString . '\"');
1956
+				throw new OCSBadRequestException('Invalid share attributes provided: \"'.$attributesString.'\"');
1957 1957
 			}
1958 1958
 		}
1959 1959
 		$share->setAttributes($newShareAttributes);
Please login to merge, or discard this patch.