@@ -78,7 +78,7 @@ |
||
78 | 78 | $this->logger->debug('Default user calendar reset'); |
79 | 79 | } catch (Throwable $e) { |
80 | 80 | // Any error with activities shouldn't abort the calendar deletion, so we just log it |
81 | - $this->logger->error('Error generating activities for a deleted calendar: ' . $e->getMessage(), [ |
|
81 | + $this->logger->error('Error generating activities for a deleted calendar: '.$e->getMessage(), [ |
|
82 | 82 | 'exception' => $e, |
83 | 83 | ]); |
84 | 84 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // build the fields |
126 | 126 | foreach ($properties as $property => $updated) { |
127 | 127 | $column = $entity->propertyToColumn($property); |
128 | - $getter = 'get' . ucfirst($property); |
|
128 | + $getter = 'get'.ucfirst($property); |
|
129 | 129 | $value = $entity->$getter(); |
130 | 130 | |
131 | 131 | $type = $this->getParameterTypeForProperty($entity, $property); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | // build the fields |
200 | 200 | foreach ($properties as $property => $updated) { |
201 | 201 | $column = $entity->propertyToColumn($property); |
202 | - $getter = 'get' . ucfirst($property); |
|
202 | + $getter = 'get'.ucfirst($property); |
|
203 | 203 | $value = $entity->$getter(); |
204 | 204 | |
205 | 205 | $type = $this->getParameterTypeForProperty($entity, $property); |
@@ -229,11 +229,11 @@ discard block |
||
229 | 229 | protected function getParameterTypeForProperty(Entity $entity, string $property) { |
230 | 230 | $types = $entity->getFieldTypes(); |
231 | 231 | |
232 | - if (!isset($types[ $property ])) { |
|
232 | + if (!isset($types[$property])) { |
|
233 | 233 | return IQueryBuilder::PARAM_STR; |
234 | 234 | } |
235 | 235 | |
236 | - switch ($types[ $property ]) { |
|
236 | + switch ($types[$property]) { |
|
237 | 237 | case 'int': |
238 | 238 | case 'integer': |
239 | 239 | return IQueryBuilder::PARAM_INT; |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | * @since 14.0.0 |
295 | 295 | */ |
296 | 296 | private function buildDebugMessage(string $msg, IQueryBuilder $sql): string { |
297 | - return $msg . |
|
298 | - ': query "' . $sql->getSQL() . '"; '; |
|
297 | + return $msg. |
|
298 | + ': query "'.$sql->getSQL().'"; '; |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * @since 14.0.0 |
310 | 310 | */ |
311 | 311 | protected function mapRowToEntity(array $row): Entity { |
312 | - return \call_user_func($this->entityClass .'::fromRow', $row); |
|
312 | + return \call_user_func($this->entityClass.'::fromRow', $row); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $numUpdated = 0; |
63 | 63 | $numRemoved = 0; |
64 | 64 | |
65 | - $this->userManager->callForSeenUsers(function (IUser $user) use (&$numUpdated, &$numRemoved) { |
|
65 | + $this->userManager->callForSeenUsers(function(IUser $user) use (&$numUpdated, &$numRemoved) { |
|
66 | 66 | $account = $this->accountManager->getAccount($user); |
67 | 67 | $property = $account->getProperty(IAccountManager::PROPERTY_PHONE); |
68 | 68 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | }); |
83 | 83 | |
84 | 84 | if ($numRemoved > 0 || $numUpdated > 0) { |
85 | - $output->info('Updated ' . $numUpdated . ' entries and cleaned ' . $numRemoved . ' invalid phone numbers'); |
|
85 | + $output->info('Updated '.$numUpdated.' entries and cleaned '.$numRemoved.' invalid phone numbers'); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | protected function run($argument) { |
110 | - $try = (int)$argument['try'] + 1; |
|
110 | + $try = (int) $argument['try'] + 1; |
|
111 | 111 | |
112 | 112 | switch ($argument['type']) { |
113 | 113 | case IAccountManager::PROPERTY_WEBSITE: |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | break; |
120 | 120 | default: |
121 | 121 | // no valid type given, no need to retry |
122 | - $this->logger->error($argument['type'] . ' is no valid type for user account data.'); |
|
122 | + $this->logger->error($argument['type'].' is no valid type for user account data.'); |
|
123 | 123 | $result = true; |
124 | 124 | } |
125 | 125 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | protected function verifyWebsite(array $argument) { |
138 | 138 | $result = false; |
139 | 139 | |
140 | - $url = rtrim($argument['data'], '/') . '/.well-known/' . 'CloudIdVerificationCode.txt'; |
|
140 | + $url = rtrim($argument['data'], '/').'/.well-known/'.'CloudIdVerificationCode.txt'; |
|
141 | 141 | |
142 | 142 | $client = $this->httpClientService->newClient(); |
143 | 143 | try { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $user = $this->userManager->get($argument['uid']); |
155 | 155 | // we don't check a valid user -> give up |
156 | 156 | if ($user === null) { |
157 | - $this->logger->error($argument['uid'] . ' doesn\'t exist, can\'t verify user data.'); |
|
157 | + $this->logger->error($argument['uid'].' doesn\'t exist, can\'t verify user data.'); |
|
158 | 158 | return $result; |
159 | 159 | } |
160 | 160 | $userAccount = $this->accountManager->getAccount($user); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | |
181 | 181 | // we don't check a valid user -> give up |
182 | 182 | if ($user === null) { |
183 | - $this->logger->info($argument['uid'] . ' doesn\'t exist, can\'t verify user data.'); |
|
183 | + $this->logger->info($argument['uid'].' doesn\'t exist, can\'t verify user data.'); |
|
184 | 184 | return true; |
185 | 185 | } |
186 | 186 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | try { |
223 | 223 | $client = $this->httpClientService->newClient(); |
224 | 224 | $response = $client->get( |
225 | - $this->lookupServerUrl . '/users?search=' . urlencode($cloudId) . '&exactCloudId=1', |
|
225 | + $this->lookupServerUrl.'/users?search='.urlencode($cloudId).'&exactCloudId=1', |
|
226 | 226 | [ |
227 | 227 | 'timeout' => 10, |
228 | 228 | 'connect_timeout' => 3, |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | 'data' => $argument['data'], |
255 | 255 | 'type' => $argument['type'], |
256 | 256 | 'uid' => $argument['uid'], |
257 | - 'try' => (int)$argument['try'] + 1, |
|
257 | + 'try' => (int) $argument['try'] + 1, |
|
258 | 258 | 'lastRun' => time() |
259 | 259 | ] |
260 | 260 | ); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | * @return bool |
268 | 268 | */ |
269 | 269 | protected function shouldRun(array $argument) { |
270 | - $lastRun = (int)$argument['lastRun']; |
|
270 | + $lastRun = (int) $argument['lastRun']; |
|
271 | 271 | return ((time() - $lastRun) > $this->interval); |
272 | 272 | } |
273 | 273 |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | // always use the version from the original file, also part files |
206 | 206 | // need to have a correct version number if they get moved over to the |
207 | 207 | // final location |
208 | - $this->version = (int)$this->keyManager->getVersion($this->stripPartFileExtension($path), new View()); |
|
208 | + $this->version = (int) $this->keyManager->getVersion($this->stripPartFileExtension($path), new View()); |
|
209 | 209 | |
210 | 210 | if ( |
211 | 211 | $mode === 'w' |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | if ($this->writeCache) { |
309 | 309 | |
310 | 310 | // Concat writeCache to start of $data |
311 | - $data = $this->writeCache . $data; |
|
311 | + $data = $this->writeCache.$data; |
|
312 | 312 | |
313 | 313 | // Clear the write cache, ready for reuse - it has been |
314 | 314 | // flushed and its old contents processed |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | try { |
405 | 405 | $publicKeys[$user] = $this->keyManager->getPublicKey($user); |
406 | 406 | } catch (PublicKeyMissingException $e) { |
407 | - $this->logger->warning('Could not encrypt file for ' . $user . ': ' . $e->getMessage()); |
|
407 | + $this->logger->warning('Could not encrypt file for '.$user.': '.$e->getMessage()); |
|
408 | 408 | } |
409 | 409 | } |
410 | 410 | } |
@@ -490,8 +490,8 @@ discard block |
||
490 | 490 | // error message because in this case it means that the file was |
491 | 491 | // shared with the user at a point where the user didn't had a |
492 | 492 | // valid private/public key |
493 | - $msg = 'Encryption module "' . $this->getDisplayName() . |
|
494 | - '" is not able to read ' . $path; |
|
493 | + $msg = 'Encryption module "'.$this->getDisplayName(). |
|
494 | + '" is not able to read '.$path; |
|
495 | 495 | $hint = $this->l->t('Cannot read this file, probably this is a shared file. Please ask the file owner to reshare the file with you.'); |
496 | 496 | $this->logger->warning($msg); |
497 | 497 | throw new DecryptionFailedException($msg, $hint); |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | $realPath = $path; |
534 | 534 | $parts = explode('/', $path); |
535 | 535 | if ($parts[2] === 'files_versions') { |
536 | - $realPath = '/' . $parts[1] . '/files/' . implode('/', array_slice($parts, 3)); |
|
536 | + $realPath = '/'.$parts[1].'/files/'.implode('/', array_slice($parts, 3)); |
|
537 | 537 | $length = strrpos($realPath, '.'); |
538 | 538 | $realPath = substr($realPath, 0, $length); |
539 | 539 | } |
@@ -58,9 +58,9 @@ |
||
58 | 58 | * @since 14.0.0 |
59 | 59 | */ |
60 | 60 | protected function shouldRotateBySize():bool { |
61 | - if ((int)$this->maxSize > 0 && file_exists($this->filePath)) { |
|
61 | + if ((int) $this->maxSize > 0 && file_exists($this->filePath)) { |
|
62 | 62 | $filesize = @filesize($this->filePath); |
63 | - if ($filesize >= (int)$this->maxSize) { |
|
63 | + if ($filesize >= (int) $this->maxSize) { |
|
64 | 64 | return true; |
65 | 65 | } |
66 | 66 | } |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | OC_Util::checkLoggedIn(); |
33 | 33 | \OC::$server->getSession()->close(); |
34 | 34 | |
35 | -$files = isset($_GET['files']) ? (string)$_GET['files'] : ''; |
|
36 | -$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : ''; |
|
35 | +$files = isset($_GET['files']) ? (string) $_GET['files'] : ''; |
|
36 | +$dir = isset($_GET['dir']) ? (string) $_GET['dir'] : ''; |
|
37 | 37 | |
38 | 38 | $files_list = json_decode($files); |
39 | 39 | // in case we get only a single file |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | -$server_params = [ 'head' => \OC::$server->getRequest()->getMethod() === 'HEAD' ]; |
|
69 | +$server_params = ['head' => \OC::$server->getRequest()->getMethod() === 'HEAD']; |
|
70 | 70 | |
71 | 71 | /** |
72 | 72 | * Http range requests support |
@@ -106,7 +106,7 @@ |
||
106 | 106 | |
107 | 107 | try { |
108 | 108 | $this->systemTagManager->updateTag($input->getArgument('id'), $name, $userVisible, $userAssignable); |
109 | - $output->writeln('<info>Tag updated ("' . $name . '", '. $userVisible . ', ' . $userAssignable . ')</info>'); |
|
109 | + $output->writeln('<info>Tag updated ("'.$name.'", '.$userVisible.', '.$userAssignable.')</info>'); |
|
110 | 110 | return 0; |
111 | 111 | } catch (TagNotFoundException $e) { |
112 | 112 | $output->writeln('<error>Tag not found</error>'); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | 'count-dirs', |
62 | 62 | null, |
63 | 63 | InputOption::VALUE_NONE, |
64 | - 'Also count the number of user directories in the database (could time out on huge installations, therefore defaults to no with ' . self::DEFAULT_COUNT_DIRS_MAX_USERS . '+ users)' |
|
64 | + 'Also count the number of user directories in the database (could time out on huge installations, therefore defaults to no with '.self::DEFAULT_COUNT_DIRS_MAX_USERS.'+ users)' |
|
65 | 65 | ) |
66 | 66 | ; |
67 | 67 | } |