@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | |
33 | 33 | switch ($key) { |
34 | 34 | case 'sorting': |
35 | - $safe = $this->isSortingSafe('type',$parsedConfigItem, $safe); |
|
36 | - $safe = $this->isSortingSafe('order',$parsedConfigItem, $safe); |
|
35 | + $safe = $this->isSortingSafe('type', $parsedConfigItem, $safe); |
|
36 | + $safe = $this->isSortingSafe('order', $parsedConfigItem, $safe); |
|
37 | 37 | break; |
38 | 38 | case 'design': |
39 | 39 | $safe = $this->isDesignColourSafe($parsedConfigItem, $safe); |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | * @param bool $safe whether the current config has been deemed safe to use so far |
51 | 51 | * @return bool |
52 | 52 | */ |
53 | - private function isSortingSafe($key,$parsedConfigItem, $safe) { |
|
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; |
@@ -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/ |
@@ -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); |
@@ -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 | } |
@@ -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 |
@@ -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 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $message = $exception->getMessage(); |
70 | 70 | $code = $this->getHttpStatusCode($exception); |
71 | 71 | $url = $urlGenerator->linkToRoute( |
72 | - $appName . '.page.error_page', ['code' => $code] |
|
72 | + $appName.'.page.error_page', ['code' => $code] |
|
73 | 73 | ); |
74 | 74 | |
75 | 75 | $response = new RedirectResponse($url); |