@@ -82,14 +82,14 @@ discard block |
||
82 | 82 | |
83 | 83 | |
84 | 84 | // filter out excluded shares and group shares that includes self |
85 | - $shares = array_filter($shares, function (\OCP\Share\IShare $share) use ($user) { |
|
85 | + $shares = array_filter($shares, function(\OCP\Share\IShare $share) use ($user) { |
|
86 | 86 | return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID(); |
87 | 87 | }); |
88 | 88 | |
89 | 89 | $superShares = $this->buildSuperShares($shares, $user); |
90 | 90 | |
91 | 91 | $mounts = []; |
92 | - $view = new View('/' . $user->getUID() . '/files'); |
|
92 | + $view = new View('/'.$user->getUID().'/files'); |
|
93 | 93 | $ownerViews = []; |
94 | 94 | $sharingDisabledForUser = $this->shareManager->sharingDisabledForUser($user->getUID()); |
95 | 95 | $foldersExistCache = new CappedMemoryCache(); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $owner = $parentShare->getShareOwner(); |
109 | 109 | if (!isset($ownerViews[$owner])) { |
110 | - $ownerViews[$owner] = new View('/' . $parentShare->getShareOwner() . '/files'); |
|
110 | + $ownerViews[$owner] = new View('/'.$parentShare->getShareOwner().'/files'); |
|
111 | 111 | } |
112 | 112 | $mount = new SharedMount( |
113 | 113 | '\OCA\Files_Sharing\SharedStorage', |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $result = []; |
157 | 157 | // sort by stime, the super share will be based on the least recent share |
158 | 158 | foreach ($tmp as &$tmp2) { |
159 | - @usort($tmp2, function ($a, $b) { |
|
159 | + @usort($tmp2, function($a, $b) { |
|
160 | 160 | $aTime = $a->getShareTime()->getTimestamp(); |
161 | 161 | $bTime = $b->getShareTime()->getTimestamp(); |
162 | 162 | if ($aTime === $bTime) { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | // null groups which usually appear with group backend |
224 | 224 | // caching inconsistencies |
225 | 225 | $this->logger->debug( |
226 | - 'Could not adjust share target for share ' . $share->getId() . ' to make it consistent: ' . $e->getMessage(), |
|
226 | + 'Could not adjust share target for share '.$share->getId().' to make it consistent: '.$e->getMessage(), |
|
227 | 227 | ['app' => 'files_sharing'] |
228 | 228 | ); |
229 | 229 | } |
@@ -174,7 +174,7 @@ |
||
174 | 174 | |
175 | 175 | $shares = array_merge($groupShares, $roomShares, $deckShares); |
176 | 176 | |
177 | - $shares = array_map(function (IShare $share) { |
|
177 | + $shares = array_map(function(IShare $share) { |
|
178 | 178 | return $this->formatShare($share); |
179 | 179 | }, $shares); |
180 | 180 |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | 'message' => $userStatus->getMessage(), |
246 | 246 | 'icon' => $userStatus->getIcon(), |
247 | 247 | 'clearAt' => $userStatus->getClearAt() |
248 | - ? (int)$userStatus->getClearAt()->format('U') |
|
248 | + ? (int) $userStatus->getClearAt()->format('U') |
|
249 | 249 | : null, |
250 | 250 | ]; |
251 | 251 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | // "share_with" and "share_with_displayname" for passwords of link |
259 | 259 | // shares was deprecated in Nextcloud 15, use "password" instead. |
260 | 260 | $result['share_with'] = $share->getPassword(); |
261 | - $result['share_with_displayname'] = '(' . $this->l->t('Shared link') . ')'; |
|
261 | + $result['share_with_displayname'] = '('.$this->l->t('Shared link').')'; |
|
262 | 262 | |
263 | 263 | $result['password'] = $share->getPassword(); |
264 | 264 | |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | |
654 | 654 | $shares = array_merge($userShares, $groupShares, $circleShares, $roomShares, $deckShares); |
655 | 655 | |
656 | - $filteredShares = array_filter($shares, function (IShare $share) { |
|
656 | + $filteredShares = array_filter($shares, function(IShare $share) { |
|
657 | 657 | return $share->getShareOwner() !== $this->currentUser; |
658 | 658 | }); |
659 | 659 | |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | $nodes = $folder->getDirectoryListing(); |
691 | 691 | |
692 | 692 | /** @var \OCP\Share\IShare[] $shares */ |
693 | - $shares = array_reduce($nodes, function ($carry, $node) { |
|
693 | + $shares = array_reduce($nodes, function($carry, $node) { |
|
694 | 694 | $carry = array_merge($carry, $this->getAllShares($node, true)); |
695 | 695 | return $carry; |
696 | 696 | }, []); |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | } |
1193 | 1193 | } |
1194 | 1194 | |
1195 | - $result = array_filter(array_map(function (IShare $share) { |
|
1195 | + $result = array_filter(array_map(function(IShare $share) { |
|
1196 | 1196 | $userFolder = $this->rootFolder->getUserFolder($share->getSharedBy()); |
1197 | 1197 | $nodes = $userFolder->getById($share->getNodeId()); |
1198 | 1198 | if (empty($nodes)) { |
@@ -1214,7 +1214,7 @@ discard block |
||
1214 | 1214 | } catch (NotFoundException $e) { |
1215 | 1215 | return null; |
1216 | 1216 | } |
1217 | - }, $pendingShares), function ($entry) { |
|
1217 | + }, $pendingShares), function($entry) { |
|
1218 | 1218 | return $entry !== null; |
1219 | 1219 | }); |
1220 | 1220 | |
@@ -1474,7 +1474,7 @@ discard block |
||
1474 | 1474 | |
1475 | 1475 | // First check if it is an internal share. |
1476 | 1476 | try { |
1477 | - $share = $this->shareManager->getShareById('ocinternal:' . $id, $this->currentUser); |
|
1477 | + $share = $this->shareManager->getShareById('ocinternal:'.$id, $this->currentUser); |
|
1478 | 1478 | return $share; |
1479 | 1479 | } catch (ShareNotFound $e) { |
1480 | 1480 | // Do nothing, just try the other share type |
@@ -1483,7 +1483,7 @@ discard block |
||
1483 | 1483 | |
1484 | 1484 | try { |
1485 | 1485 | if ($this->shareManager->shareProviderExists(IShare::TYPE_CIRCLE)) { |
1486 | - $share = $this->shareManager->getShareById('ocCircleShare:' . $id, $this->currentUser); |
|
1486 | + $share = $this->shareManager->getShareById('ocCircleShare:'.$id, $this->currentUser); |
|
1487 | 1487 | return $share; |
1488 | 1488 | } |
1489 | 1489 | } catch (ShareNotFound $e) { |
@@ -1492,7 +1492,7 @@ discard block |
||
1492 | 1492 | |
1493 | 1493 | try { |
1494 | 1494 | if ($this->shareManager->shareProviderExists(IShare::TYPE_EMAIL)) { |
1495 | - $share = $this->shareManager->getShareById('ocMailShare:' . $id, $this->currentUser); |
|
1495 | + $share = $this->shareManager->getShareById('ocMailShare:'.$id, $this->currentUser); |
|
1496 | 1496 | return $share; |
1497 | 1497 | } |
1498 | 1498 | } catch (ShareNotFound $e) { |
@@ -1500,7 +1500,7 @@ discard block |
||
1500 | 1500 | } |
1501 | 1501 | |
1502 | 1502 | try { |
1503 | - $share = $this->shareManager->getShareById('ocRoomShare:' . $id, $this->currentUser); |
|
1503 | + $share = $this->shareManager->getShareById('ocRoomShare:'.$id, $this->currentUser); |
|
1504 | 1504 | return $share; |
1505 | 1505 | } catch (ShareNotFound $e) { |
1506 | 1506 | // Do nothing, just try the other share type |
@@ -1508,7 +1508,7 @@ discard block |
||
1508 | 1508 | |
1509 | 1509 | try { |
1510 | 1510 | if ($this->shareManager->shareProviderExists(IShare::TYPE_DECK)) { |
1511 | - $share = $this->shareManager->getShareById('deck:' . $id, $this->currentUser); |
|
1511 | + $share = $this->shareManager->getShareById('deck:'.$id, $this->currentUser); |
|
1512 | 1512 | return $share; |
1513 | 1513 | } |
1514 | 1514 | } catch (ShareNotFound $e) { |
@@ -1518,7 +1518,7 @@ discard block |
||
1518 | 1518 | if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) { |
1519 | 1519 | throw new ShareNotFound(); |
1520 | 1520 | } |
1521 | - $share = $this->shareManager->getShareById('ocFederatedSharing:' . $id, $this->currentUser); |
|
1521 | + $share = $this->shareManager->getShareById('ocFederatedSharing:'.$id, $this->currentUser); |
|
1522 | 1522 | |
1523 | 1523 | return $share; |
1524 | 1524 | } |