@@ -36,8 +36,8 @@ |
||
36 | 36 | return; |
37 | 37 | } |
38 | 38 | |
39 | - $event->addEntityCollection('files', function ($name) { |
|
40 | - $nodes = \OC::$server->getUserFolder()->getById((int)$name); |
|
39 | + $event->addEntityCollection('files', function($name) { |
|
40 | + $nodes = \OC::$server->getUserFolder()->getById((int) $name); |
|
41 | 41 | return !empty($nodes); |
42 | 42 | }); |
43 | 43 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | public function run(IOutput $output) { |
76 | 76 | $output->startProgress(); |
77 | - $this->userManager->callForSeenUsers(function (IUser $user) use ($output) { |
|
77 | + $this->userManager->callForSeenUsers(function(IUser $user) use ($output) { |
|
78 | 78 | $theme = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'theme', false); |
79 | 79 | if ($theme === 'themedark') { |
80 | 80 | $this->config->setUserValue($user->getUID(), Application::APP_ID, 'theme', 'dark'); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * we can not inject it. Thus the static call. |
132 | 132 | */ |
133 | 133 | \OC::$server->getLogger()->logException($e, [ |
134 | - 'message' => 'Could not load lazy crash reporter: ' . $e->getMessage(), |
|
134 | + 'message' => 'Could not load lazy crash reporter: '.$e->getMessage(), |
|
135 | 135 | 'level' => ILogger::FATAL, |
136 | 136 | ]); |
137 | 137 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * we can not inject it. Thus the static call. |
148 | 148 | */ |
149 | 149 | \OC::$server->getLogger()->logException($e, [ |
150 | - 'message' => 'Could not register lazy crash reporter: ' . $e->getMessage(), |
|
150 | + 'message' => 'Could not register lazy crash reporter: '.$e->getMessage(), |
|
151 | 151 | 'level' => ILogger::FATAL, |
152 | 152 | ]); |
153 | 153 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | $query = $this->connection->getQueryBuilder(); |
71 | 71 | $query->update('share') |
72 | - ->set('share_type', $query->createNamedParameter(IShare::TYPE_GUEST)) |
|
72 | + ->set('share_type', $query->createNamedParameter(IShare::TYPE_GUEST)) |
|
73 | 73 | ->where($query->expr()->eq('share_type', $query->createNamedParameter(IShare::TYPE_EMAIL))); |
74 | 74 | $query->execute(); |
75 | 75 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function get($search, $itemType, $itemId, $sorter = null, $shareTypes = [IShare::TYPE_USER], $limit = 10): DataResponse { |
76 | 76 | // if enumeration/user listings are disabled, we'll receive an empty |
77 | 77 | // result from search() – thus nothing else to do here. |
78 | - [$results,] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); |
|
78 | + [$results, ] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); |
|
79 | 79 | |
80 | 80 | $event = new AutoCompleteEvent([ |
81 | 81 | 'search' => $search, |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | 'shareTypes' => $shareTypes, |
87 | 87 | 'limit' => $limit, |
88 | 88 | ]); |
89 | - $this->dispatcher->dispatch(IManager::class . '::filterResults', $event); |
|
89 | + $this->dispatcher->dispatch(IManager::class.'::filterResults', $event); |
|
90 | 90 | $results = $event->getResults(); |
91 | 91 | |
92 | 92 | $exactMatches = $results['exact']; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function cacheFor(int $cacheSeconds, bool $public = false) { |
109 | 109 | if ($cacheSeconds > 0) { |
110 | 110 | $pragma = $public ? 'public' : 'private'; |
111 | - $this->addHeader('Cache-Control', $pragma . ', max-age=' . $cacheSeconds . ', must-revalidate'); |
|
111 | + $this->addHeader('Cache-Control', $pragma.', max-age='.$cacheSeconds.', must-revalidate'); |
|
112 | 112 | $this->addHeader('Pragma', $pragma); |
113 | 113 | |
114 | 114 | // Set expires header |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * @since 6.0.0 - return value was added in 7.0.0 |
198 | 198 | */ |
199 | 199 | public function addHeader($name, $value) { |
200 | - $name = trim($name); // always remove leading and trailing whitespace |
|
200 | + $name = trim($name); // always remove leading and trailing whitespace |
|
201 | 201 | // to be able to reliably check for security |
202 | 202 | // headers |
203 | 203 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $this->headers['X-Robots-Tag'] = 'none'; |
243 | 243 | |
244 | 244 | if ($this->ETag) { |
245 | - $mergeWith['ETag'] = '"' . $this->ETag . '"'; |
|
245 | + $mergeWith['ETag'] = '"'.$this->ETag.'"'; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | return array_merge($mergeWith, $this->headers); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $documentationUrl = $this->urlGenerator->linkToDocs('developer-code-integrity'); |
82 | 82 | $output->writeln('This command requires the --path, --privateKey and --certificate.'); |
83 | 83 | $output->writeln('Example: ./occ integrity:sign-app --path="/Users/lukasreschke/Programming/myapp/" --privateKey="/Users/lukasreschke/private/myapp.key" --certificate="/Users/lukasreschke/public/mycert.crt"'); |
84 | - $output->writeln('For more information please consult the documentation: '. $documentationUrl); |
|
84 | + $output->writeln('For more information please consult the documentation: '.$documentationUrl); |
|
85 | 85 | return 1; |
86 | 86 | } |
87 | 87 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->checker->writeAppSignature($path, $x509, $rsa); |
108 | 108 | $output->writeln('Successfully signed "'.$path.'"'); |
109 | 109 | } catch (\Exception $e) { |
110 | - $output->writeln('Error: ' . $e->getMessage()); |
|
110 | + $output->writeln('Error: '.$e->getMessage()); |
|
111 | 111 | return 1; |
112 | 112 | } |
113 | 113 | return 0; |
@@ -62,10 +62,10 @@ |
||
62 | 62 | if (is_array($value)) { |
63 | 63 | $output->writeln(" <comment>>></comment> $key:"); |
64 | 64 | foreach ($value as $subKey => $subValue) { |
65 | - $output->writeln(" <comment>>></comment> $subKey: " . str_repeat(' ', 46 - strlen($subKey)) . $subValue); |
|
65 | + $output->writeln(" <comment>>></comment> $subKey: ".str_repeat(' ', 46 - strlen($subKey)).$subValue); |
|
66 | 66 | } |
67 | 67 | } else { |
68 | - $output->writeln(" <comment>>></comment> $key: " . str_repeat(' ', 50 - strlen($key)) . $value); |
|
68 | + $output->writeln(" <comment>>></comment> $key: ".str_repeat(' ', 50 - strlen($key)).$value); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | return 0; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | try { |
72 | 72 | $configs = $this->validateFileContent($content); |
73 | 73 | } catch (\UnexpectedValueException $e) { |
74 | - $output->writeln('<error>' . $e->getMessage(). '</error>'); |
|
74 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
75 | 75 | return 1; |
76 | 76 | } |
77 | 77 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - $output->writeln('<info>Config successfully imported from: ' . $importFile . '</info>'); |
|
94 | + $output->writeln('<info>Config successfully imported from: '.$importFile.'</info>'); |
|
95 | 95 | return 0; |
96 | 96 | } |
97 | 97 | |
@@ -145,10 +145,10 @@ discard block |
||
145 | 145 | $additionalKeys = array_diff($arrayKeys, $this->validRootKeys); |
146 | 146 | $commonKeys = array_intersect($arrayKeys, $this->validRootKeys); |
147 | 147 | if (!empty($additionalKeys)) { |
148 | - throw new \UnexpectedValueException('Found invalid entries in root: ' . implode(', ', $additionalKeys)); |
|
148 | + throw new \UnexpectedValueException('Found invalid entries in root: '.implode(', ', $additionalKeys)); |
|
149 | 149 | } |
150 | 150 | if (empty($commonKeys)) { |
151 | - throw new \UnexpectedValueException('At least one key of the following is expected: ' . implode(', ', $this->validRootKeys)); |
|
151 | + throw new \UnexpectedValueException('At least one key of the following is expected: '.implode(', ', $this->validRootKeys)); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | if (isset($array['system'])) { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | protected function checkTypeRecursively($configValue, $configName) { |
178 | 178 | if (!is_array($configValue) && !is_bool($configValue) && !is_int($configValue) && !is_string($configValue) && !is_null($configValue)) { |
179 | - throw new \UnexpectedValueException('Invalid system config value for "' . $configName . '". Only arrays, bools, integers, strings and null (delete) are allowed.'); |
|
179 | + throw new \UnexpectedValueException('Invalid system config value for "'.$configName.'". Only arrays, bools, integers, strings and null (delete) are allowed.'); |
|
180 | 180 | } |
181 | 181 | if (is_array($configValue)) { |
182 | 182 | foreach ($configValue as $key => $value) { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | foreach ($array as $app => $configs) { |
195 | 195 | foreach ($configs as $name => $value) { |
196 | 196 | if (!is_int($value) && !is_string($value) && !is_null($value)) { |
197 | - throw new \UnexpectedValueException('Invalid app config value for "' . $app . '":"' . $name . '". Only integers, strings and null (delete) are allowed.'); |
|
197 | + throw new \UnexpectedValueException('Invalid app config value for "'.$app.'":"'.$name.'". Only integers, strings and null (delete) are allowed.'); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | } |