@@ -59,18 +59,18 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $shares = $this->shareByCircleProvider->getSharesToCircle($teamId); |
| 62 | - usort($shares, function ($a, $b) { |
|
| 62 | + usort($shares, function($a, $b) { |
|
| 63 | 63 | return (int)($b->getItemType() === 'folder') - (int)($a->getItemType() === 'folder'); |
| 64 | 64 | }); |
| 65 | - return array_map(function (ShareWrapper $shareWrapper) { |
|
| 65 | + return array_map(function(ShareWrapper $shareWrapper) { |
|
| 66 | 66 | $isFolder = $shareWrapper->getItemType() === 'folder'; |
| 67 | 67 | return new TeamResource( |
| 68 | 68 | $this, |
| 69 | 69 | (string)$shareWrapper->getFileSource(), |
| 70 | 70 | basename($shareWrapper->getFileTarget()), |
| 71 | - $this->urlGenerator->getAbsoluteURL('/index.php/f/' . $shareWrapper->getFileSource()), |
|
| 71 | + $this->urlGenerator->getAbsoluteURL('/index.php/f/'.$shareWrapper->getFileSource()), |
|
| 72 | 72 | iconSvg: $isFolder ? '<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder" viewBox="0 0 24 24"><path d="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z" /></svg>' : null, |
| 73 | - iconURL: !$isFolder ? |
|
| 73 | + iconURL : !$isFolder ? |
|
| 74 | 74 | $this->urlGenerator->linkToRouteAbsolute('core.preview.getPreviewByFileId', ['fileId' => $shareWrapper->getFileSource(), 'mimeFallback' => true, ]) |
| 75 | 75 | : null, |
| 76 | 76 | ); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | return false; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - return count(array_filter($this->getSharedWith($teamId), function (TeamResource $resource) use ($resourceId) { |
|
| 85 | + return count(array_filter($this->getSharedWith($teamId), function(TeamResource $resource) use ($resourceId) { |
|
| 86 | 86 | return $resource->getId() === $resourceId; |
| 87 | 87 | })) !== 0; |
| 88 | 88 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | $shares = $this->shareByCircleProvider->getSharesByFileId((int)$resourceId); |
| 96 | 96 | |
| 97 | - return array_map(function ($share) { |
|
| 97 | + return array_map(function($share) { |
|
| 98 | 98 | return $share->getSharedWith(); |
| 99 | 99 | }, $shares); |
| 100 | 100 | } |