@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | $ext = 'png'; |
| 113 | 113 | |
| 114 | 114 | if ($size === -1) { |
| 115 | - $path = 'avatar-placeholder' . ($darkTheme ? '-dark' : '') . '.' . $ext; |
|
| 115 | + $path = 'avatar-placeholder'.($darkTheme ? '-dark' : '').'.'.$ext; |
|
| 116 | 116 | } else { |
| 117 | - $path = 'avatar-placeholder' . ($darkTheme ? '-dark' : '') . '.' . $size . '.' . $ext; |
|
| 117 | + $path = 'avatar-placeholder'.($darkTheme ? '-dark' : '').'.'.$size.'.'.$ext; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | try { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $file = $this->folder->newFile($path); |
| 133 | 133 | $file->putContent($data); |
| 134 | 134 | } catch (NotPermittedException $e) { |
| 135 | - $this->logger->error('Failed to save avatar placeholder for ' . $this->user->getUID()); |
|
| 135 | + $this->logger->error('Failed to save avatar placeholder for '.$this->user->getUID()); |
|
| 136 | 136 | throw new NotFoundException(); |
| 137 | 137 | } |
| 138 | 138 | } |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | private function getGroups(IUser $user): array { |
| 236 | 236 | $groups = array_map( |
| 237 | - static function (IGroup $group) { |
|
| 237 | + static function(IGroup $group) { |
|
| 238 | 238 | return $group->getDisplayName(); |
| 239 | 239 | }, |
| 240 | 240 | $this->groupManager->getUserGroups($user) |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | ]; |
| 258 | 258 | |
| 259 | 259 | $additionalEmails = array_map( |
| 260 | - function (IAccountProperty $property) { |
|
| 260 | + function(IAccountProperty $property) { |
|
| 261 | 261 | return [ |
| 262 | 262 | 'name' => $property->getName(), |
| 263 | 263 | 'value' => $property->getValue(), |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | $emailMap = [ |
| 273 | 273 | 'primaryEmail' => $systemEmail, |
| 274 | 274 | 'additionalEmails' => $additionalEmails, |
| 275 | - 'notificationEmail' => (string)$account->getUser()->getPrimaryEMailAddress(), |
|
| 275 | + 'notificationEmail' => (string) $account->getUser()->getPrimaryEMailAddress(), |
|
| 276 | 276 | ]; |
| 277 | 277 | |
| 278 | 278 | return $emailMap; |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | default: |
| 367 | 367 | $message = $this->l->t('Verify'); |
| 368 | 368 | } |
| 369 | - $messageParameters[$property . 'Message'] = $message; |
|
| 369 | + $messageParameters[$property.'Message'] = $message; |
|
| 370 | 370 | } |
| 371 | 371 | return $messageParameters; |
| 372 | 372 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | // no avatar to remove |
| 58 | 58 | } catch (\Exception $e) { |
| 59 | 59 | // Ignore exceptions |
| 60 | - $this->logger->info('Could not cleanup avatar of ' . $user->getUID(), [ |
|
| 60 | + $this->logger->info('Could not cleanup avatar of '.$user->getUID(), [ |
|
| 61 | 61 | 'exception' => $e, |
| 62 | 62 | ]); |
| 63 | 63 | } |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | return; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - $tagsIds = array_map(fn (array $row) => (int)$row['id'], $result->fetchAll()); |
|
| 126 | + $tagsIds = array_map(fn (array $row) => (int) $row['id'], $result->fetchAll()); |
|
| 127 | 127 | $result->closeCursor(); |
| 128 | 128 | |
| 129 | 129 | if (count($tagsIds) === 0) { |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $this->logger->error('Giving up after ' . self::TOKEN_RETRIES . ' retries to generate a unique local editor token for path hash: ' . $pathHash); |
|
| 103 | + $this->logger->error('Giving up after '.self::TOKEN_RETRIES.' retries to generate a unique local editor token for path hash: '.$pathHash); |
|
| 104 | 104 | return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $qb->expr()->isNotNull('custom_icon'), |
| 84 | 84 | $qb->expr()->isNotNull('custom_message'), |
| 85 | 85 | ), |
| 86 | - $qb->expr()->notLike('user_id', $qb->createNamedParameter($this->db->escapeLikeParameter('_') . '%')) |
|
| 86 | + $qb->expr()->notLike('user_id', $qb->createNamedParameter($this->db->escapeLikeParameter('_').'%')) |
|
| 87 | 87 | )); |
| 88 | 88 | |
| 89 | 89 | if ($limit !== null) { |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $qb |
| 107 | 107 | ->select('*') |
| 108 | 108 | ->from($this->tableName) |
| 109 | - ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR))); |
|
| 109 | + ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_'.$userId : $userId, IQueryBuilder::PARAM_STR))); |
|
| 110 | 110 | |
| 111 | 111 | return $this->findEntity($qb); |
| 112 | 112 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $qb = $this->db->getQueryBuilder(); |
| 196 | 196 | $qb->update($this->tableName) |
| 197 | 197 | ->set('is_backup', $qb->createNamedParameter(true, IQueryBuilder::PARAM_BOOL)) |
| 198 | - ->set('user_id', $qb->createNamedParameter('_' . $userId)) |
|
| 198 | + ->set('user_id', $qb->createNamedParameter('_'.$userId)) |
|
| 199 | 199 | ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId))); |
| 200 | 200 | return $qb->executeStatement() > 0; |
| 201 | 201 | } |
@@ -89,10 +89,10 @@ |
||
| 89 | 89 | * @return void |
| 90 | 90 | */ |
| 91 | 91 | public function propFind(PropFind $propFind, INode $node) { |
| 92 | - $propFind->handle('{DAV:}supportedlock', function () { |
|
| 92 | + $propFind->handle('{DAV:}supportedlock', function() { |
|
| 93 | 93 | return new SupportedLock(); |
| 94 | 94 | }); |
| 95 | - $propFind->handle('{DAV:}lockdiscovery', function () use ($propFind) { |
|
| 95 | + $propFind->handle('{DAV:}lockdiscovery', function() use ($propFind) { |
|
| 96 | 96 | return new LockDiscovery([]); |
| 97 | 97 | }); |
| 98 | 98 | } |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | $res['group'] = []; |
| 117 | 117 | $res['group']['enabled'] = $this->shareManager->allowGroupSharing(); |
| 118 | 118 | $res['group']['expire_date']['enabled'] = true; |
| 119 | - $res['default_permissions'] = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', (string)Constants::PERMISSION_ALL); |
|
| 119 | + $res['default_permissions'] = (int) $this->config->getAppValue('core', 'shareapi_default_permissions', (string) Constants::PERMISSION_ALL); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | //Federated sharing |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $mounts = $this->globalService->getStorageForAllUsers(); |
| 88 | 88 | $userId = self::ALL; |
| 89 | 89 | } else { |
| 90 | - $userId = (string)$input->getArgument('user_id'); |
|
| 90 | + $userId = (string) $input->getArgument('user_id'); |
|
| 91 | 91 | $storageService = $this->getStorageService($userId); |
| 92 | 92 | $mounts = $storageService->getAllStorages(); |
| 93 | 93 | } |
@@ -140,11 +140,11 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
| 143 | - $keys = array_map(function ($header) { |
|
| 143 | + $keys = array_map(function($header) { |
|
| 144 | 144 | return strtolower(str_replace(' ', '_', $header)); |
| 145 | 145 | }, $headers); |
| 146 | 146 | |
| 147 | - $pairs = array_map(function (StorageConfig $config) use ($keys, $userId) { |
|
| 147 | + $pairs = array_map(function(StorageConfig $config) use ($keys, $userId) { |
|
| 148 | 148 | $values = [ |
| 149 | 149 | $config->getId(), |
| 150 | 150 | $config->getMountPoint(), |
@@ -178,23 +178,23 @@ discard block |
||
| 178 | 178 | 'encoding_compatibility' => false, |
| 179 | 179 | 'readonly' => false, |
| 180 | 180 | ]; |
| 181 | - $rows = array_map(function (StorageConfig $config) use ($userId, $defaultMountOptions, $full) { |
|
| 181 | + $rows = array_map(function(StorageConfig $config) use ($userId, $defaultMountOptions, $full) { |
|
| 182 | 182 | $storageConfig = $config->getBackendOptions(); |
| 183 | 183 | $keys = array_keys($storageConfig); |
| 184 | 184 | $values = array_values($storageConfig); |
| 185 | 185 | |
| 186 | 186 | if (!$full) { |
| 187 | - $values = array_map(function ($value) { |
|
| 187 | + $values = array_map(function($value) { |
|
| 188 | 188 | if (is_string($value) && strlen($value) > 32) { |
| 189 | - return substr($value, 0, 6) . '...' . substr($value, -6, 6); |
|
| 189 | + return substr($value, 0, 6).'...'.substr($value, -6, 6); |
|
| 190 | 190 | } else { |
| 191 | 191 | return $value; |
| 192 | 192 | } |
| 193 | 193 | }, $values); |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - $configStrings = array_map(function ($key, $value) { |
|
| 197 | - return $key . ': ' . json_encode($value); |
|
| 196 | + $configStrings = array_map(function($key, $value) { |
|
| 197 | + return $key.': '.json_encode($value); |
|
| 198 | 198 | }, $keys, $values); |
| 199 | 199 | $configString = implode(', ', $configStrings); |
| 200 | 200 | |
@@ -208,8 +208,8 @@ discard block |
||
| 208 | 208 | $keys = array_keys($mountOptions); |
| 209 | 209 | $values = array_values($mountOptions); |
| 210 | 210 | |
| 211 | - $optionsStrings = array_map(function ($key, $value) { |
|
| 212 | - return $key . ': ' . json_encode($value); |
|
| 211 | + $optionsStrings = array_map(function($key, $value) { |
|
| 212 | + return $key.': '.json_encode($value); |
|
| 213 | 213 | }, $keys, $values); |
| 214 | 214 | $optionsString = implode(', ', $optionsStrings); |
| 215 | 215 | |