@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function getSharedWithList(array $teams): array { |
53 | 53 | $data = $shares = []; |
54 | - foreach($this->shareByCircleProvider->getSharesToCircles($teams) as $share) { |
|
54 | + foreach ($this->shareByCircleProvider->getSharesToCircles($teams) as $share) { |
|
55 | 55 | if (!array_key_exists($share->getId(), $shares)) { |
56 | 56 | $shares[$share->getSharedWith()] = []; |
57 | 57 | } |
@@ -72,18 +72,18 @@ discard block |
||
72 | 72 | * @return TeamResource[] |
73 | 73 | */ |
74 | 74 | private function convertWrappedShareToResource(array $shares): array { |
75 | - usort($shares, function ($a, $b) { |
|
75 | + usort($shares, function($a, $b) { |
|
76 | 76 | return (int)($b->getItemType() === 'folder') - (int)($a->getItemType() === 'folder'); |
77 | 77 | }); |
78 | - return array_map(function (ShareWrapper $shareWrapper) { |
|
78 | + return array_map(function(ShareWrapper $shareWrapper) { |
|
79 | 79 | $isFolder = $shareWrapper->getItemType() === 'folder'; |
80 | 80 | return new TeamResource( |
81 | 81 | $this, |
82 | 82 | (string)$shareWrapper->getFileSource(), |
83 | 83 | basename($shareWrapper->getFileTarget()), |
84 | - $this->urlGenerator->getAbsoluteURL('/index.php/f/' . $shareWrapper->getFileSource()), |
|
84 | + $this->urlGenerator->getAbsoluteURL('/index.php/f/'.$shareWrapper->getFileSource()), |
|
85 | 85 | 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, |
86 | - iconURL: !$isFolder ? |
|
86 | + iconURL : !$isFolder ? |
|
87 | 87 | $this->urlGenerator->linkToRouteAbsolute('core.preview.getPreviewByFileId', ['fileId' => $shareWrapper->getFileSource(), 'mimeFallback' => true, ]) |
88 | 88 | : null, |
89 | 89 | ); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | return false; |
96 | 96 | } |
97 | 97 | |
98 | - return count(array_filter($this->getSharedWith($teamId), function (TeamResource $resource) use ($resourceId) { |
|
98 | + return count(array_filter($this->getSharedWith($teamId), function(TeamResource $resource) use ($resourceId) { |
|
99 | 99 | return $resource->getId() === $resourceId; |
100 | 100 | })) !== 0; |
101 | 101 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $shares = $this->shareByCircleProvider->getSharesByFileId((int)$resourceId); |
109 | 109 | |
110 | - return array_map(function ($share) { |
|
110 | + return array_map(function($share) { |
|
111 | 111 | return $share->getSharedWith(); |
112 | 112 | }, $shares); |
113 | 113 | } |