@@ -61,7 +61,7 @@ |
||
61 | 61 | if ($this->enabled && $this->cloudIdManager->isValidCloudId($search) && $offset === 0) { |
62 | 62 | [$remoteGroup, $serverUrl] = $this->splitGroupRemote($search); |
63 | 63 | $result['exact'][] = [ |
64 | - 'label' => $remoteGroup . " ($serverUrl)", |
|
64 | + 'label' => $remoteGroup." ($serverUrl)", |
|
65 | 65 | 'guid' => $remoteGroup, |
66 | 66 | 'name' => $remoteGroup, |
67 | 67 | 'value' => [ |
@@ -71,12 +71,12 @@ |
||
71 | 71 | [$alias, $columnName] = explode('.', $string, 2); |
72 | 72 | |
73 | 73 | if ($columnName === '*') { |
74 | - return '`' . $alias . '`.*'; |
|
74 | + return '`'.$alias.'`.*'; |
|
75 | 75 | } |
76 | 76 | |
77 | - return '`' . $alias . '`.`' . $columnName . '`'; |
|
77 | + return '`'.$alias.'`.`'.$columnName.'`'; |
|
78 | 78 | } |
79 | 79 | |
80 | - return '`' . $string . '`'; |
|
80 | + return '`'.$string.'`'; |
|
81 | 81 | } |
82 | 82 | } |
@@ -319,7 +319,7 @@ |
||
319 | 319 | if ($tagData === null) { |
320 | 320 | [$name, $status] = explode('|||', substr($parameter, 3, -3)); |
321 | 321 | $tagData = [ |
322 | - 'id' => 0,// No way to recover the ID |
|
322 | + 'id' => 0, // No way to recover the ID |
|
323 | 323 | 'name' => $name, |
324 | 324 | 'assignable' => $status === 'assignable', |
325 | 325 | 'visible' => $status !== 'invisible', |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | protected function getAddressbookHomeForPrincipal($principal) { |
46 | 46 | if (strrpos($principal, 'principals/users', -strlen($principal)) !== false) { |
47 | 47 | [, $principalId] = \Sabre\Uri\split($principal); |
48 | - return self::ADDRESSBOOK_ROOT . '/users/' . $principalId; |
|
48 | + return self::ADDRESSBOOK_ROOT.'/users/'.$principalId; |
|
49 | 49 | } |
50 | 50 | if (strrpos($principal, 'principals/groups', -strlen($principal)) !== false) { |
51 | 51 | [, $principalId] = \Sabre\Uri\split($principal); |
52 | - return self::ADDRESSBOOK_ROOT . '/groups/' . $principalId; |
|
52 | + return self::ADDRESSBOOK_ROOT.'/groups/'.$principalId; |
|
53 | 53 | } |
54 | 54 | if (strrpos($principal, 'principals/system', -strlen($principal)) !== false) { |
55 | 55 | [, $principalId] = \Sabre\Uri\split($principal); |
56 | - return self::ADDRESSBOOK_ROOT . '/system/' . $principalId; |
|
56 | + return self::ADDRESSBOOK_ROOT.'/system/'.$principalId; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $ns = '{http://owncloud.org/ns}'; |
69 | 69 | |
70 | 70 | if ($node instanceof AddressBook) { |
71 | - $propFind->handle($ns . 'groups', function () use ($node) { |
|
71 | + $propFind->handle($ns.'groups', function() use ($node) { |
|
72 | 72 | return new Groups($node->getContactsGroups()); |
73 | 73 | }); |
74 | 74 | } |
@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | $proxies = $this->proxyMapper->getProxiesFor($principal); |
93 | 93 | foreach ($proxies as $proxy) { |
94 | 94 | if ($proxy->getPermissions() === ProxyMapper::PERMISSION_READ) { |
95 | - $groups[] = $proxy->getOwnerId() . '/calendar-proxy-read'; |
|
95 | + $groups[] = $proxy->getOwnerId().'/calendar-proxy-read'; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | if ($proxy->getPermissions() === (ProxyMapper::PERMISSION_READ | ProxyMapper::PERMISSION_WRITE)) { |
99 | - $groups[] = $proxy->getOwnerId() . '/calendar-proxy-write'; |
|
99 | + $groups[] = $proxy->getOwnerId().'/calendar-proxy-write'; |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | [$prefix, $name] = \Sabre\Uri\split($member); |
137 | 137 | |
138 | 138 | if ($prefix !== $this->principalPrefix) { |
139 | - throw new Exception('Invalid member group prefix: ' . $prefix); |
|
139 | + throw new Exception('Invalid member group prefix: '.$prefix); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $principalArray = $this->getPrincipalByPath($member); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $proxy->setPermissions($proxy->getPermissions() | $permission); |
152 | 152 | $this->proxyMapper->update($proxy); |
153 | 153 | |
154 | - $proxies = array_filter($proxies, function (Proxy $p) use ($proxy) { |
|
154 | + $proxies = array_filter($proxies, function(Proxy $p) use ($proxy) { |
|
155 | 155 | return $p->getId() !== $proxy->getId(); |
156 | 156 | }); |
157 | 157 | break; |
@@ -224,9 +224,9 @@ discard block |
||
224 | 224 | )) { |
225 | 225 | // note: pre-fetching only supported for depth <= 1 |
226 | 226 | $folderContent = $node->getChildren(); |
227 | - $fileIds[] = (int)$node->getId(); |
|
227 | + $fileIds[] = (int) $node->getId(); |
|
228 | 228 | foreach ($folderContent as $info) { |
229 | - $fileIds[] = (int)$info->getId(); |
|
229 | + $fileIds[] = (int) $info->getId(); |
|
230 | 230 | } |
231 | 231 | $tags = $this->getTagger()->getTagsForObjects($fileIds); |
232 | 232 | if ($tags === false) { |
@@ -244,12 +244,12 @@ discard block |
||
244 | 244 | |
245 | 245 | $isFav = null; |
246 | 246 | |
247 | - $propFind->handle(self::TAGS_PROPERTYNAME, function () use (&$isFav, $node) { |
|
247 | + $propFind->handle(self::TAGS_PROPERTYNAME, function() use (&$isFav, $node) { |
|
248 | 248 | [$tags, $isFav] = $this->getTagsAndFav($node->getId()); |
249 | 249 | return new TagList($tags); |
250 | 250 | }); |
251 | 251 | |
252 | - $propFind->handle(self::FAVORITE_PROPERTYNAME, function () use ($isFav, $node) { |
|
252 | + $propFind->handle(self::FAVORITE_PROPERTYNAME, function() use ($isFav, $node) { |
|
253 | 253 | if (is_null($isFav)) { |
254 | 254 | [, $isFav] = $this->getTagsAndFav($node->getId()); |
255 | 255 | } |
@@ -275,13 +275,13 @@ discard block |
||
275 | 275 | return; |
276 | 276 | } |
277 | 277 | |
278 | - $propPatch->handle(self::TAGS_PROPERTYNAME, function ($tagList) use ($node) { |
|
278 | + $propPatch->handle(self::TAGS_PROPERTYNAME, function($tagList) use ($node) { |
|
279 | 279 | $this->updateTags($node->getId(), $tagList->getTags()); |
280 | 280 | return true; |
281 | 281 | }); |
282 | 282 | |
283 | - $propPatch->handle(self::FAVORITE_PROPERTYNAME, function ($favState) use ($node) { |
|
284 | - if ((int)$favState === 1 || $favState === 'true') { |
|
283 | + $propPatch->handle(self::FAVORITE_PROPERTYNAME, function($favState) use ($node) { |
|
284 | + if ((int) $favState === 1 || $favState === 'true') { |
|
285 | 285 | $this->getTagger()->tagAs($node->getId(), self::TAG_FAVORITE); |
286 | 286 | } else { |
287 | 287 | $this->getTagger()->unTag($node->getId(), self::TAG_FAVORITE); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | if (isset($info['transferid'])) { |
91 | 91 | // getNodePath is called for multiple nodes within a chunk |
92 | 92 | // upload call |
93 | - $path = $dir . '/' . $info['name']; |
|
93 | + $path = $dir.'/'.$info['name']; |
|
94 | 94 | $path = ltrim($path, '/'); |
95 | 95 | } |
96 | 96 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } catch (StorageNotAvailableException $e) { |
162 | 162 | throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available', 0, $e); |
163 | 163 | } catch (StorageInvalidException $e) { |
164 | - throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid'); |
|
164 | + throw new \Sabre\DAV\Exception\NotFound('Storage '.$path.' is invalid'); |
|
165 | 165 | } catch (LockedException $e) { |
166 | 166 | throw new \Sabre\DAV\Exception\Locked(); |
167 | 167 | } catch (ForbiddenException $e) { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } |
171 | 171 | |
172 | 172 | if (!$info) { |
173 | - throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located'); |
|
173 | + throw new \Sabre\DAV\Exception\NotFound('File with name '.$path.' could not be located'); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | if ($info->getType() === 'dir') { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
238 | 238 | } |
239 | 239 | |
240 | - [$destinationDir,] = \Sabre\Uri\split($destinationPath); |
|
240 | + [$destinationDir, ] = \Sabre\Uri\split($destinationPath); |
|
241 | 241 | $this->markDirty($destinationDir); |
242 | 242 | } |
243 | 243 | } |
@@ -41,15 +41,15 @@ |
||
41 | 41 | public function getCalendarHomeForPrincipal($principalUrl) { |
42 | 42 | if (strrpos($principalUrl, 'principals/users', -strlen($principalUrl)) !== false) { |
43 | 43 | [, $principalId] = \Sabre\Uri\split($principalUrl); |
44 | - return self::CALENDAR_ROOT . '/' . $principalId; |
|
44 | + return self::CALENDAR_ROOT.'/'.$principalId; |
|
45 | 45 | } |
46 | 46 | if (strrpos($principalUrl, 'principals/calendar-resources', -strlen($principalUrl)) !== false) { |
47 | 47 | [, $principalId] = \Sabre\Uri\split($principalUrl); |
48 | - return self::SYSTEM_CALENDAR_ROOT . '/calendar-resources/' . $principalId; |
|
48 | + return self::SYSTEM_CALENDAR_ROOT.'/calendar-resources/'.$principalId; |
|
49 | 49 | } |
50 | 50 | if (strrpos($principalUrl, 'principals/calendar-rooms', -strlen($principalUrl)) !== false) { |
51 | 51 | [, $principalId] = \Sabre\Uri\split($principalUrl); |
52 | - return self::SYSTEM_CALENDAR_ROOT . '/calendar-rooms/' . $principalId; |
|
52 | + return self::SYSTEM_CALENDAR_ROOT.'/calendar-rooms/'.$principalId; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | $server->on('report', [$this, 'report']); |
84 | 84 | |
85 | - $server->xml->elementMap['{' . self::NS_Nextcloud . '}calendar-search'] = |
|
85 | + $server->xml->elementMap['{'.self::NS_Nextcloud.'}calendar-search'] = |
|
86 | 86 | CalendarSearchReport::class; |
87 | 87 | } |
88 | 88 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function report($reportName, $report, $path) { |
98 | 98 | switch ($reportName) { |
99 | - case '{' . self::NS_Nextcloud . '}calendar-search': |
|
99 | + case '{'.self::NS_Nextcloud.'}calendar-search': |
|
100 | 100 | $this->server->transactionType = 'report-nc-calendar-search'; |
101 | 101 | $this->calendarSearch($report); |
102 | 102 | return false; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | $reports = []; |
120 | 120 | if ($node instanceof CalendarHome) { |
121 | - $reports[] = '{' . self::NS_Nextcloud . '}calendar-search'; |
|
121 | + $reports[] = '{'.self::NS_Nextcloud.'}calendar-search'; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | return $reports; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | foreach ($nodePaths as $path) { |
149 | 149 | [$properties] = $this->server->getPropertiesForPath( |
150 | - $this->server->getRequestUri() . '/' . $path, |
|
150 | + $this->server->getRequestUri().'/'.$path, |
|
151 | 151 | $report->properties); |
152 | 152 | $result[] = $properties; |
153 | 153 | } |