@@ -38,10 +38,10 @@ |
||
38 | 38 | $this->preview = $image['preview']; |
39 | 39 | |
40 | 40 | $this->setStatus($statusCode); |
41 | - $this->addHeader('Content-type', $image['mimetype'] . '; charset=utf-8'); |
|
41 | + $this->addHeader('Content-type', $image['mimetype'].'; charset=utf-8'); |
|
42 | 42 | $this->addHeader('Content-Disposition', |
43 | - 'attachment; filename*=UTF-8\'\'' . \rawurlencode($name) . '; filename="' |
|
44 | - . \rawurlencode($name) . '"' |
|
43 | + 'attachment; filename*=UTF-8\'\''.\rawurlencode($name).'; filename="' |
|
44 | + . \rawurlencode($name).'"' |
|
45 | 45 | ); |
46 | 46 | } |
47 | 47 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * @param int $code the HTTP status code |
30 | 30 | */ |
31 | 31 | public function __construct($msg, $code = 0) { |
32 | - Util::writeLog('gallery', 'Exception: ' . $msg . ' (' . $code . ')', Util::ERROR); |
|
32 | + Util::writeLog('gallery', 'Exception: '.$msg.' ('.$code.')', Util::ERROR); |
|
33 | 33 | parent::__construct($msg, $code); |
34 | 34 | } |
35 | 35 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * without having to know whether they're private or public |
144 | 144 | */ |
145 | 145 | public function setStandardEnv() { |
146 | - $this->fromRootToFolder = $this->userFolder->getPath() . '/'; |
|
146 | + $this->fromRootToFolder = $this->userFolder->getPath().'/'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function getNodeFromVirtualRoot($subPath) { |
166 | 166 | $relativePath = $this->getRelativePath($this->fromRootToFolder); |
167 | - $path = $relativePath . '/' . $subPath; |
|
167 | + $path = $relativePath.'/'.$subPath; |
|
168 | 168 | $node = $this->getNodeFromUserFolder($path); |
169 | 169 | |
170 | 170 | return $this->getResourceFromId($node->getId()); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | try { |
191 | 191 | $node = $folder->get($path); |
192 | 192 | } catch (NotFoundException $exception) { |
193 | - $message = 'Could not find anything at: ' . $exception->getMessage(); |
|
193 | + $message = 'Could not find anything at: '.$exception->getMessage(); |
|
194 | 194 | throw new NotFoundEnvException($message); |
195 | 195 | } |
196 | 196 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | if ($nodeType === 'dir') { |
245 | 245 | $rootFolder = $node; |
246 | 246 | } else { |
247 | - throw new NotFoundEnvException($node->getPath() . ' is not a folder'); |
|
247 | + throw new NotFoundEnvException($node->getPath().' is not a folder'); |
|
248 | 248 | } |
249 | 249 | } |
250 | 250 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | $resourcesArray = $folder->getById($resourceId); |
359 | 359 | |
360 | 360 | if ($resourcesArray[0] === null) { |
361 | - throw new NotFoundEnvException('Could not locate node linked to ID: ' . $resourceId); |
|
361 | + throw new NotFoundEnvException('Could not locate node linked to ID: '.$resourceId); |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | return $resourcesArray[0]; |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | */ |
377 | 377 | private function buildFromRootToFolder($fileSource) { |
378 | 378 | $resource = $this->getResourceFromId($fileSource); |
379 | - $fromRootToFolder = $resource->getPath() . '/'; |
|
379 | + $fromRootToFolder = $resource->getPath().'/'; |
|
380 | 380 | |
381 | 381 | return $fromRootToFolder; |
382 | 382 | } |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | * @return string |
397 | 397 | */ |
398 | 398 | private function getRelativePath($fullPath) { |
399 | - $folderPath = $this->userFolder->getPath() . '/'; |
|
399 | + $folderPath = $this->userFolder->getPath().'/'; |
|
400 | 400 | $origShareRelPath = \str_replace($folderPath, '', $fullPath); |
401 | 401 | |
402 | 402 | return $origShareRelPath; |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | if (!empty($type)) { |
76 | - echo 'event: ' . $type . PHP_EOL; |
|
76 | + echo 'event: '.$type.PHP_EOL; |
|
77 | 77 | } |
78 | - echo 'data: ' . \json_encode($data) . PHP_EOL; |
|
78 | + echo 'data: '.\json_encode($data).PHP_EOL; |
|
79 | 79 | |
80 | 80 | echo PHP_EOL; |
81 | 81 | \flush(); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | private function validateMessage($type, $data) { |
102 | 102 | if ($data && !\preg_match('/^[A-Za-z0-9_]+$/', $type)) { |
103 | - throw new \BadMethodCallException('Type needs to be alphanumeric (' . $type . ')'); |
|
103 | + throw new \BadMethodCallException('Type needs to be alphanumeric ('.$type.')'); |
|
104 | 104 | } |
105 | 105 | } |
106 | 106 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | $c->query('OCP\INavigationManager') |
27 | 27 | ->add( |
28 | - function () use ($c, $appName) { |
|
28 | + function() use ($c, $appName) { |
|
29 | 29 | $urlGenerator = $c->query('OCP\IURLGenerator'); |
30 | 30 | $l10n = $c->query('OCP\IL10N'); |
31 | 31 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | // The route that will be shown on startup when called from within the GUI |
40 | 40 | // Public links are using another route, see appinfo/routes.php |
41 | - 'href' => $urlGenerator->linkToRoute($appName . '.page.index'), |
|
41 | + 'href' => $urlGenerator->linkToRoute($appName.'.page.index'), |
|
42 | 42 | |
43 | 43 | // The icon that will be shown in the navigation |
44 | 44 | // This file needs to exist in img/ |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $subFolders = \explode('/', $relativePath); |
43 | 43 | |
44 | 44 | if (\count($subFolders) > 2) { |
45 | - $reducedPath = $currFolderPath . $subFolders[0] . '/' . \array_pop($subFolders); |
|
45 | + $reducedPath = $currFolderPath.$subFolders[0].'/'.\array_pop($subFolders); |
|
46 | 46 | } else { |
47 | 47 | $reducedPath = $path; |
48 | 48 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $logger->logException($exception, ['app' => 'gallery']); |
55 | 55 | $message = \sprintf('An error occurred. Request ID: %s', $request->getId()); |
56 | 56 | } else { |
57 | - $message = $exception->getMessage() . ' (' . $code . ')'; |
|
57 | + $message = $exception->getMessage().' ('.$code.')'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | return new JSONResponse( |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $message = $exception->getMessage(); |
78 | 78 | $code = $this->getHttpStatusCode($exception); |
79 | 79 | $url = $urlGenerator->linkToRoute( |
80 | - $appName . '.page.error_page', ['code' => $code] |
|
80 | + $appName.'.page.error_page', ['code' => $code] |
|
81 | 81 | ); |
82 | 82 | |
83 | 83 | $response = new RedirectResponse($url); |
@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | private function isSortingSafe($key, $parsedConfigItem, $safe) { |
54 | 54 | if ($safe && \array_key_exists($key, $parsedConfigItem)) { |
55 | - $safe = $safe && $this->sortingValidator($key, $parsedConfigItem[ $key ]); |
|
55 | + $safe = $safe && $this->sortingValidator($key, $parsedConfigItem[$key]); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | return $safe; |