@@ -299,7 +299,7 @@ |
||
299 | 299 | */ |
300 | 300 | private function buildErrorMessage($exception, $folder) { |
301 | 301 | $configPath = $this->environment->getPathFromVirtualRoot($folder); |
302 | - $errorMessage = $exception->getMessage() . ". Config location: /$configPath"; |
|
302 | + $errorMessage = $exception->getMessage().". Config location: /$configPath"; |
|
303 | 303 | $this->logger->error($errorMessage); |
304 | 304 | $config = ['error' => ['message' => $errorMessage]]; |
305 | 305 |
@@ -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 | } |
@@ -117,7 +117,7 @@ |
||
117 | 117 | } catch (ServiceException $exception) { |
118 | 118 | $code = $this->getHttpStatusCode($exception); |
119 | 119 | $url = $this->urlGenerator->linkToRoute( |
120 | - $this->appName . '.page.error_page', ['code' => $code] |
|
120 | + $this->appName.'.page.error_page', ['code' => $code] |
|
121 | 121 | ); |
122 | 122 | |
123 | 123 | $response = new RedirectResponse($url); |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | |
51 | 51 | // If the exception is not of type ForbiddenServiceException only show a |
52 | 52 | // generic error message to avoid leaking information. |
53 | - if(!($exception instanceof ForbiddenServiceException)) { |
|
53 | + if (!($exception instanceof ForbiddenServiceException)) { |
|
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); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | ) { |
181 | 181 | $message = |
182 | 182 | 'Passed token seems to be valid, but it does not contain all necessary information . ("' |
183 | - . $token . '")'; |
|
183 | + . $token.'")'; |
|
184 | 184 | throw new CheckException($message, Http::STATUS_NOT_FOUND); |
185 | 185 | } |
186 | 186 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | */ |
195 | 195 | private function checkItemType($share) { |
196 | 196 | if ($share->getNodeType() === null) { |
197 | - $message = 'No item type set for share id: ' . $share->getId(); |
|
197 | + $message = 'No item type set for share id: '.$share->getId(); |
|
198 | 198 | throw new CheckException($message, Http::STATUS_NOT_FOUND); |
199 | 199 | } |
200 | 200 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $this->checkPassword($share, $password); |
237 | 237 | } else { |
238 | 238 | throw new CheckException( |
239 | - 'Unknown share type ' . $share->getShareType() . ' for share id ' |
|
239 | + 'Unknown share type '.$share->getShareType().' for share id ' |
|
240 | 240 | . $share->getId(), Http::STATUS_NOT_FOUND |
241 | 241 | ); |
242 | 242 | } |
@@ -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 |
@@ -149,7 +149,7 @@ |
||
149 | 149 | */ |
150 | 150 | private function redirectToErrorPage($message, $code) { |
151 | 151 | $url = $this->urlGenerator->linkToRoute( |
152 | - $this->appName . '.page.error_page', ['code' => $code] |
|
152 | + $this->appName.'.page.error_page', ['code' => $code] |
|
153 | 153 | ); |
154 | 154 | |
155 | 155 | $response = new RedirectResponse($url); |
@@ -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 |