@@ -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/ |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @param string $msg the message contained in the exception |
26 | 26 | */ |
27 | 27 | public function __construct($msg) { |
28 | - Util::writeLog('gallery', 'Exception: ' . $msg, Util::ERROR); |
|
28 | + Util::writeLog('gallery', 'Exception: '.$msg, Util::ERROR); |
|
29 | 29 | parent::__construct($msg); |
30 | 30 | } |
31 | 31 | } |
@@ -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 @@ |
||
25 | 25 | * @param string $msg the message contained in the exception |
26 | 26 | */ |
27 | 27 | public function __construct($msg) { |
28 | - Util::writeLog('gallery', 'Exception' . $msg, Util::ERROR); |
|
28 | + Util::writeLog('gallery', 'Exception'.$msg, Util::ERROR); |
|
29 | 29 | parent::__construct($msg); |
30 | 30 | } |
31 | 31 | } |
@@ -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 |
@@ -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 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @param string $msg the message contained in the exception |
26 | 26 | */ |
27 | 27 | public function __construct($msg) { |
28 | - Util::writeLog('gallery', 'Exception: ' . $msg, Util::ERROR); |
|
28 | + Util::writeLog('gallery', 'Exception: '.$msg, Util::ERROR); |
|
29 | 29 | parent::__construct($msg); |
30 | 30 | } |
31 | 31 | } |
@@ -34,14 +34,14 @@ |
||
34 | 34 | * @param int $statusCode the HTTP status code, defaults to 200 |
35 | 35 | */ |
36 | 36 | public function __construct(array $image, $statusCode = Http::STATUS_OK) { |
37 | - $name = $image['name']; |
|
38 | - $this->preview = $image['preview']; |
|
37 | + $name = $image[ 'name' ]; |
|
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 |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | |
15 | 15 | ini_set("gd.jpeg_ignore_warning", true); |
16 | 16 | |
17 | -require_once __DIR__ . '/../../vendor/autoload.php'; |
|
17 | +require_once __DIR__.'/../../vendor/autoload.php'; |
|
18 | 18 | |
19 | 19 | // A production environment will not have xdebug enabled and |
20 | 20 | // a development environment should have the dev packages installed |
21 | -$c3 = __DIR__ . '/../../c3.php'; |
|
21 | +$c3 = __DIR__.'/../../c3.php'; |
|
22 | 22 | if (extension_loaded('xdebug') && file_exists($c3)) { |
23 | 23 | include_once $c3; |
24 | 24 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param array $urlParams |
68 | 68 | */ |
69 | - public function __construct(array $urlParams = []) { |
|
69 | + public function __construct(array $urlParams = [ ]) { |
|
70 | 70 | parent::__construct('gallery', $urlParams); |
71 | 71 | |
72 | 72 | $container = $this->getContainer(); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * Controllers |
76 | 76 | */ |
77 | 77 | $container->registerService( |
78 | - 'PageController', function (IContainer $c) { |
|
78 | + 'PageController', function(IContainer $c) { |
|
79 | 79 | return new PageController( |
80 | 80 | $c->query('AppName'), |
81 | 81 | $c->query('Request'), |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | ); |
90 | 90 | $container->registerService( |
91 | - 'ConfigController', function (IContainer $c) { |
|
91 | + 'ConfigController', function(IContainer $c) { |
|
92 | 92 | return new ConfigController( |
93 | 93 | $c->query('AppName'), |
94 | 94 | $c->query('Request'), |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | ); |
100 | 100 | $container->registerService( |
101 | - 'ConfigPublicController', function (IContainer $c) { |
|
101 | + 'ConfigPublicController', function(IContainer $c) { |
|
102 | 102 | return new ConfigPublicController( |
103 | 103 | $c->query('AppName'), |
104 | 104 | $c->query('Request'), |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | } |
109 | 109 | ); |
110 | 110 | $container->registerService( |
111 | - 'ConfigApiController', function (IContainer $c) { |
|
111 | + 'ConfigApiController', function(IContainer $c) { |
|
112 | 112 | return new ConfigApiController( |
113 | 113 | $c->query('AppName'), |
114 | 114 | $c->query('Request'), |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | } |
119 | 119 | ); |
120 | 120 | $container->registerService( |
121 | - 'FilesController', function (IContainer $c) { |
|
121 | + 'FilesController', function(IContainer $c) { |
|
122 | 122 | return new FilesController( |
123 | 123 | $c->query('AppName'), |
124 | 124 | $c->query('Request'), |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | ); |
134 | 134 | $container->registerService( |
135 | - 'FilesPublicController', function (IContainer $c) { |
|
135 | + 'FilesPublicController', function(IContainer $c) { |
|
136 | 136 | return new FilesPublicController( |
137 | 137 | $c->query('AppName'), |
138 | 138 | $c->query('Request'), |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } |
147 | 147 | ); |
148 | 148 | $container->registerService( |
149 | - 'FilesApiController', function (IContainer $c) { |
|
149 | + 'FilesApiController', function(IContainer $c) { |
|
150 | 150 | return new FilesApiController( |
151 | 151 | $c->query('AppName'), |
152 | 152 | $c->query('Request'), |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | ); |
162 | 162 | $container->registerService( |
163 | - 'PreviewController', function (IContainer $c) { |
|
163 | + 'PreviewController', function(IContainer $c) { |
|
164 | 164 | return new PreviewController( |
165 | 165 | $c->query('AppName'), |
166 | 166 | $c->query('Request'), |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | } |
176 | 176 | ); |
177 | 177 | $container->registerService( |
178 | - 'PreviewPublicController', function (IContainer $c) { |
|
178 | + 'PreviewPublicController', function(IContainer $c) { |
|
179 | 179 | return new PreviewPublicController( |
180 | 180 | $c->query('AppName'), |
181 | 181 | $c->query('Request'), |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | } |
191 | 191 | ); |
192 | 192 | $container->registerService( |
193 | - 'PreviewApiController', function (IContainer $c) { |
|
193 | + 'PreviewApiController', function(IContainer $c) { |
|
194 | 194 | return new PreviewApiController( |
195 | 195 | $c->query('AppName'), |
196 | 196 | $c->query('Request'), |
@@ -209,30 +209,30 @@ discard block |
||
209 | 209 | * Core |
210 | 210 | */ |
211 | 211 | $container->registerService( |
212 | - 'EventSource', function (IAppContainer $c) { |
|
212 | + 'EventSource', function(IAppContainer $c) { |
|
213 | 213 | return new EventSource(); |
214 | 214 | } |
215 | 215 | ); |
216 | 216 | $container->registerService( |
217 | - 'Token', function (IContainer $c) { |
|
217 | + 'Token', function(IContainer $c) { |
|
218 | 218 | return $c->query('Request') |
219 | 219 | ->getParam('token'); |
220 | 220 | } |
221 | 221 | ); |
222 | 222 | $container->registerService( |
223 | - 'Session', function (IAppContainer $c) { |
|
223 | + 'Session', function(IAppContainer $c) { |
|
224 | 224 | return $c->getServer() |
225 | 225 | ->getSession(); |
226 | 226 | } |
227 | 227 | ); |
228 | 228 | $container->registerService( |
229 | - 'L10N', function (IAppContainer $c) { |
|
229 | + 'L10N', function(IAppContainer $c) { |
|
230 | 230 | return $c->getServer() |
231 | 231 | ->getL10N('gallery'); // Keep the same translations |
232 | 232 | } |
233 | 233 | ); |
234 | 234 | $container->registerService( |
235 | - 'UserFolder', function (IAppContainer $c) { |
|
235 | + 'UserFolder', function(IAppContainer $c) { |
|
236 | 236 | return $c->getServer() |
237 | 237 | ->getUserFolder($c->query('UserId')); |
238 | 238 | } |
@@ -242,12 +242,12 @@ discard block |
||
242 | 242 | * OCA |
243 | 243 | */ |
244 | 244 | $container->registerService( |
245 | - 'ConfigParser', function () { |
|
245 | + 'ConfigParser', function() { |
|
246 | 246 | return new ConfigParser(); |
247 | 247 | } |
248 | 248 | ); |
249 | 249 | $container->registerService( |
250 | - 'Environment', function (IContainer $c) { |
|
250 | + 'Environment', function(IContainer $c) { |
|
251 | 251 | return new Environment( |
252 | 252 | $c->query('AppName'), |
253 | 253 | $c->query('UserId'), |
@@ -274,14 +274,14 @@ discard block |
||
274 | 274 | if (\OCP\App::isEnabled('ocutility')) { |
275 | 275 | // @codeCoverageIgnoreStart |
276 | 276 | $container->registerService( |
277 | - 'UtilityContainer', function () { |
|
277 | + 'UtilityContainer', function() { |
|
278 | 278 | $app = new OcUtility(); |
279 | 279 | |
280 | 280 | return $app->getContainer(); |
281 | 281 | } |
282 | 282 | ); |
283 | 283 | $container->registerService( |
284 | - 'Helper', function (IContainer $c) { |
|
284 | + 'Helper', function(IContainer $c) { |
|
285 | 285 | return $c->query('UtilityContainer') |
286 | 286 | ->query('OCA\OcUtility\Service\Helper'); |
287 | 287 | } |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | } else { |
290 | 290 | // @codeCoverageIgnoreEnd |
291 | 291 | $container->registerService( |
292 | - 'Logger', function (IContainer $c) { |
|
292 | + 'Logger', function(IContainer $c) { |
|
293 | 293 | return $c->query('OCP\ILogger'); |
294 | 294 | } |
295 | 295 | ); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * Services |
299 | 299 | */ |
300 | 300 | $container->registerService( |
301 | - 'SearchFolderService', function (IContainer $c) { |
|
301 | + 'SearchFolderService', function(IContainer $c) { |
|
302 | 302 | return new SearchFolderService( |
303 | 303 | $c->query('AppName'), |
304 | 304 | $c->query('Environment'), |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | } |
308 | 308 | ); |
309 | 309 | $container->registerService( |
310 | - 'ConfigService', function (IContainer $c) { |
|
310 | + 'ConfigService', function(IContainer $c) { |
|
311 | 311 | return new ConfigService( |
312 | 312 | $c->query('AppName'), |
313 | 313 | $c->query('Environment'), |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | } |
319 | 319 | ); |
320 | 320 | $container->registerService( |
321 | - 'SearchMediaService', function (IContainer $c) { |
|
321 | + 'SearchMediaService', function(IContainer $c) { |
|
322 | 322 | return new SearchMediaService( |
323 | 323 | $c->query('AppName'), |
324 | 324 | $c->query('Environment'), |
@@ -327,12 +327,12 @@ discard block |
||
327 | 327 | } |
328 | 328 | ); |
329 | 329 | $container->registerService( |
330 | - 'ThumbnailService', function () { |
|
330 | + 'ThumbnailService', function() { |
|
331 | 331 | return new ThumbnailService(); |
332 | 332 | } |
333 | 333 | ); |
334 | 334 | $container->registerService( |
335 | - 'PreviewService', function (IContainer $c) { |
|
335 | + 'PreviewService', function(IContainer $c) { |
|
336 | 336 | return new PreviewService( |
337 | 337 | $c->query('AppName'), |
338 | 338 | $c->query('Environment'), |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | } |
343 | 343 | ); |
344 | 344 | $container->registerService( |
345 | - 'DownloadService', function (IContainer $c) { |
|
345 | + 'DownloadService', function(IContainer $c) { |
|
346 | 346 | return new DownloadService( |
347 | 347 | $c->query('AppName'), |
348 | 348 | $c->query('Environment'), |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | */ |
357 | 357 | $container->registerService( |
358 | 358 | 'SharingCheckMiddleware', |
359 | - function (IAppContainer $c) { |
|
359 | + function(IAppContainer $c) { |
|
360 | 360 | return new SharingCheckMiddleware( |
361 | 361 | $c->query('AppName'), |
362 | 362 | $c->query('Request'), |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | ); |
370 | 370 | $container->registerService( |
371 | 371 | 'EnvCheckMiddleware', |
372 | - function (IContainer $c) { |
|
372 | + function(IContainer $c) { |
|
373 | 373 | return new EnvCheckMiddleware( |
374 | 374 | $c->query('AppName'), |
375 | 375 | $c->query('Request'), |