@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | try { |
76 | 76 | $client = $this->clientService->newClient(); |
77 | 77 | $response = $client->get( |
78 | - $lookupServerUrl . '/users?search=' . urlencode($search), |
|
78 | + $lookupServerUrl.'/users?search='.urlencode($search), |
|
79 | 79 | [ |
80 | 80 | 'timeout' => 10, |
81 | 81 | 'connect_timeout' => 3, |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | try { |
89 | 89 | $remote = $this->cloudIdManager->resolveCloudId($lookup['federationId'])->getRemote(); |
90 | 90 | } catch (\Exception $e) { |
91 | - $this->logger->error('Can not parse federated cloud ID "' . $lookup['federationId'] . '"'); |
|
91 | + $this->logger->error('Can not parse federated cloud ID "'.$lookup['federationId'].'"'); |
|
92 | 92 | $this->logger->error($e->getMessage()); |
93 | 93 | continue; |
94 | 94 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | continue; |
97 | 97 | } |
98 | 98 | $name = isset($lookup['name']['value']) ? $lookup['name']['value'] : ''; |
99 | - $label = empty($name) ? $lookup['federationId'] : $name . ' (' . $lookup['federationId'] . ')'; |
|
99 | + $label = empty($name) ? $lookup['federationId'] : $name.' ('.$lookup['federationId'].')'; |
|
100 | 100 | $result[] = [ |
101 | 101 | 'label' => $label, |
102 | 102 | 'value' => [ |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | $previewVersion = ''; |
135 | 135 | if ($file instanceof IVersionedPreviewFile) { |
136 | - $previewVersion = $file->getPreviewVersion() . '-'; |
|
136 | + $previewVersion = $file->getPreviewVersion().'-'; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | // Get the max preview and infer the max preview sizes from that |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | continue; |
256 | 256 | } |
257 | 257 | |
258 | - $path = $prefix . (string)$preview->width() . '-' . (string)$preview->height() . '-max.' . $ext; |
|
258 | + $path = $prefix.(string) $preview->width().'-'.(string) $preview->height().'-max.'.$ext; |
|
259 | 259 | try { |
260 | 260 | $file = $previewFolder->newFile($path); |
261 | 261 | $file->putContent($preview->data()); |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | */ |
278 | 278 | private function getPreviewSize(ISimpleFile $file, string $prefix = '') { |
279 | 279 | $size = explode('-', substr($file->getName(), strlen($prefix))); |
280 | - return [(int)$size[0], (int)$size[1]]; |
|
280 | + return [(int) $size[0], (int) $size[1]]; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | /** |
@@ -289,13 +289,13 @@ discard block |
||
289 | 289 | * @return string |
290 | 290 | */ |
291 | 291 | private function generatePath($width, $height, $crop, $mimeType, $prefix) { |
292 | - $path = $prefix . (string)$width . '-' . (string)$height; |
|
292 | + $path = $prefix.(string) $width.'-'.(string) $height; |
|
293 | 293 | if ($crop) { |
294 | 294 | $path .= '-crop'; |
295 | 295 | } |
296 | 296 | |
297 | 297 | $ext = $this->getExtention($mimeType); |
298 | - $path .= '.' . $ext; |
|
298 | + $path .= '.'.$ext; |
|
299 | 299 | return $path; |
300 | 300 | } |
301 | 301 | |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | $height /= $ratio; |
386 | 386 | } |
387 | 387 | |
388 | - return [(int)round($width), (int)round($height)]; |
|
388 | + return [(int) round($width), (int) round($height)]; |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | /** |
@@ -420,10 +420,10 @@ discard block |
||
420 | 420 | $scaleH = $maxHeight / $widthR; |
421 | 421 | $scaleW = $width; |
422 | 422 | } |
423 | - $preview = $preview->preciseResizeCopy((int)round($scaleW), (int)round($scaleH)); |
|
423 | + $preview = $preview->preciseResizeCopy((int) round($scaleW), (int) round($scaleH)); |
|
424 | 424 | } |
425 | - $cropX = (int)floor(abs($width - $preview->width()) * 0.5); |
|
426 | - $cropY = (int)floor(abs($height - $preview->height()) * 0.5); |
|
425 | + $cropX = (int) floor(abs($width - $preview->width()) * 0.5); |
|
426 | + $cropY = (int) floor(abs($height - $preview->height()) * 0.5); |
|
427 | 427 | $preview = $preview->cropCopy($cropX, $cropY, $width, $height); |
428 | 428 | } else { |
429 | 429 | $preview = $maxPreview->resizeCopy(max($width, $height)); |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | case 'image/gif': |
489 | 489 | return 'gif'; |
490 | 490 | default: |
491 | - throw new \InvalidArgumentException('Not a valid mimetype: "' . $mimeType . '"'); |
|
491 | + throw new \InvalidArgumentException('Not a valid mimetype: "'.$mimeType.'"'); |
|
492 | 492 | } |
493 | 493 | } |
494 | 494 | } |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | private function sortShareesByFrequency(array $sharees): array { |
274 | - usort($sharees, function (array $s1, array $s2) { |
|
274 | + usort($sharees, function(array $s1, array $s2) { |
|
275 | 275 | return $s2['count'] - $s1['count']; |
276 | 276 | }); |
277 | 277 | return $sharees; |
@@ -422,12 +422,12 @@ discard block |
||
422 | 422 | */ |
423 | 423 | protected function getPaginationLink(int $page, array $params): string { |
424 | 424 | if ($this->isV2()) { |
425 | - $url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees') . '?'; |
|
425 | + $url = $this->urlGenerator->getAbsoluteURL('/ocs/v2.php/apps/files_sharing/api/v1/sharees').'?'; |
|
426 | 426 | } else { |
427 | - $url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees') . '?'; |
|
427 | + $url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees').'?'; |
|
428 | 428 | } |
429 | 429 | $params['page'] = $page + 1; |
430 | - return '<' . $url . http_build_query($params) . '>; rel="next"'; |
|
430 | + return '<'.$url.http_build_query($params).'>; rel="next"'; |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | /** |