@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | return; |
68 | 68 | } |
69 | 69 | |
70 | - $folders = array_filter($folders, function (ISimpleFolder $folder) { |
|
70 | + $folders = array_filter($folders, function(ISimpleFolder $folder) { |
|
71 | 71 | return $folder->fileExists('photo.'); |
72 | 72 | }); |
73 | 73 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return; |
76 | 76 | } |
77 | 77 | |
78 | - $output->info('Delete ' . count($folders) . ' "photo." files'); |
|
78 | + $output->info('Delete '.count($folders).' "photo." files'); |
|
79 | 79 | |
80 | 80 | foreach ($folders as $folder) { |
81 | 81 | try { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $folder->getFile('photo.')->delete(); |
84 | 84 | } catch (\Exception $e) { |
85 | 85 | $this->logger->logException($e); |
86 | - $output->warning('Could not delete file "dav-photocache/' . $folder->getName() . '/photo."'); |
|
86 | + $output->warning('Could not delete file "dav-photocache/'.$folder->getName().'/photo."'); |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | IClientService $httpClientService, |
75 | 75 | ICloudIdManager $cloudIdManager, |
76 | 76 | ILogger $logger) { |
77 | - $this->cloudFederationProvider= []; |
|
77 | + $this->cloudFederationProvider = []; |
|
78 | 78 | $this->appManager = $appManager; |
79 | 79 | $this->httpClientService = $httpClientService; |
80 | 80 | $this->cloudIdManager = $cloudIdManager; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | $client = $this->httpClientService->newClient(); |
142 | 142 | try { |
143 | - $response = $client->post($ocmEndPoint . '/shares', [ |
|
143 | + $response = $client->post($ocmEndPoint.'/shares', [ |
|
144 | 144 | 'body' => json_encode($share->getShare()), |
145 | 145 | 'headers' => ['content-type' => 'application/json'], |
146 | 146 | 'timeout' => 10, |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | |
181 | 181 | $client = $this->httpClientService->newClient(); |
182 | 182 | try { |
183 | - $response = $client->post($ocmEndPoint . '/notifications', [ |
|
183 | + $response = $client->post($ocmEndPoint.'/notifications', [ |
|
184 | 184 | 'body' => json_encode($notification->getMessage()), |
185 | 185 | 'headers' => ['content-type' => 'application/json'], |
186 | 186 | 'timeout' => 10, |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | } catch (\Exception $e) { |
194 | 194 | // log the error and return false |
195 | - $this->logger->error('error while sending notification for federated share: ' . $e->getMessage()); |
|
195 | + $this->logger->error('error while sending notification for federated share: '.$e->getMessage()); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | return false; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | |
221 | 221 | $client = $this->httpClientService->newClient(); |
222 | 222 | try { |
223 | - $response = $client->get($url . '/ocm-provider/', ['timeout' => 10, 'connect_timeout' => 10]); |
|
223 | + $response = $client->get($url.'/ocm-provider/', ['timeout' => 10, 'connect_timeout' => 10]); |
|
224 | 224 | } catch (\Exception $e) { |
225 | 225 | $this->ocmEndPoints[$url] = ''; |
226 | 226 | return ''; |
@@ -72,13 +72,13 @@ |
||
72 | 72 | |
73 | 73 | private function disableApp(string $appId, OutputInterface $output): void { |
74 | 74 | if ($this->appManager->isInstalled($appId) === false) { |
75 | - $output->writeln('No such app enabled: ' . $appId); |
|
75 | + $output->writeln('No such app enabled: '.$appId); |
|
76 | 76 | return; |
77 | 77 | } |
78 | 78 | |
79 | 79 | try { |
80 | 80 | $this->appManager->disableApp($appId); |
81 | - $output->writeln($appId . ' disabled'); |
|
81 | + $output->writeln($appId.' disabled'); |
|
82 | 82 | } catch (\Exception $e) { |
83 | 83 | $output->writeln($e->getMessage()); |
84 | 84 | $this->exitCode = 2; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | private function hashToken(string $token): string { |
213 | 213 | $secret = $this->config->getSystemValue('secret'); |
214 | - return hash('sha512', $token . $secret); |
|
214 | + return hash('sha512', $token.$secret); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | private function getKeyPair(): array { |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | while ($error = openssl_error_string()) { |
242 | 242 | $errors[] = $error; |
243 | 243 | } |
244 | - $this->logger->critical('Something is wrong with your openssl setup: ' . implode(', ', $errors)); |
|
244 | + $this->logger->critical('Something is wrong with your openssl setup: '.implode(', ', $errors)); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | private function encryptPassword(string $password, string $publicKey): string { |
@@ -389,7 +389,7 @@ |
||
389 | 389 | foreach ($ak as $source) { |
390 | 390 | $tags = $this->subTags[$source]; |
391 | 391 | foreach ($tags as $tag) { |
392 | - $subTags[] = $source . '_' . $tag; |
|
392 | + $subTags[] = $source.'_'.$tag; |
|
393 | 393 | } |
394 | 394 | } |
395 | 395 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $providers = $this->registry->getProviderStates($event->getUser()); |
54 | 54 | |
55 | 55 | // Loop over all providers. If all are disabled we remove the job |
56 | - $state = array_reduce($providers, function (bool $carry, bool $enabled) { |
|
56 | + $state = array_reduce($providers, function(bool $carry, bool $enabled) { |
|
57 | 57 | return $carry || $enabled; |
58 | 58 | }, false); |
59 | 59 |
@@ -39,9 +39,9 @@ |
||
39 | 39 | public function castColumn($column, $type) { |
40 | 40 | switch ($type) { |
41 | 41 | case IQueryBuilder::PARAM_INT: |
42 | - return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS INT)'); |
|
42 | + return new QueryFunction('CAST('.$this->helper->quoteColumnName($column).' AS INT)'); |
|
43 | 43 | case IQueryBuilder::PARAM_STR: |
44 | - return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS TEXT)'); |
|
44 | + return new QueryFunction('CAST('.$this->helper->quoteColumnName($column).' AS TEXT)'); |
|
45 | 45 | default: |
46 | 46 | return parent::castColumn($column, $type); |
47 | 47 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | return 1; |
129 | 129 | } |
130 | 130 | if (!$storage instanceof INotifyStorage) { |
131 | - $output->writeln('<error>Mount of type "' . $mount->getBackend()->getText() . '" does not support active update notifications</error>'); |
|
131 | + $output->writeln('<error>Mount of type "'.$mount->getBackend()->getText().'" does not support active update notifications</error>'); |
|
132 | 132 | return 1; |
133 | 133 | } |
134 | 134 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $path = trim($input->getOption('path'), '/'); |
138 | 138 | $notifyHandler = $storage->notify($path); |
139 | 139 | $this->selfTest($storage, $notifyHandler, $verbose, $output); |
140 | - $notifyHandler->listen(function (IChange $change) use ($mount, $verbose, $output) { |
|
140 | + $notifyHandler->listen(function(IChange $change) use ($mount, $verbose, $output) { |
|
141 | 141 | if ($verbose) { |
142 | 142 | $this->logUpdate($change, $output); |
143 | 143 | } |
@@ -168,14 +168,14 @@ discard block |
||
168 | 168 | $storageIds = $this->getStorageIds($mountId); |
169 | 169 | } |
170 | 170 | if (count($storageIds) === 0) { |
171 | - throw new StorageNotAvailableException('No storages found by mount ID ' . $mountId); |
|
171 | + throw new StorageNotAvailableException('No storages found by mount ID '.$mountId); |
|
172 | 172 | } |
173 | 173 | $storageIds = array_map('intval', $storageIds); |
174 | 174 | |
175 | 175 | $result = $this->updateParent($storageIds, $parent); |
176 | 176 | if ($result === 0) { |
177 | 177 | //TODO: Find existing parent further up the tree in the database and register that folder instead. |
178 | - $this->logger->info('Failed updating parent for "' . $path . '" while trying to register change. It may not exist in the filecache.'); |
|
178 | + $this->logger->info('Failed updating parent for "'.$path.'" while trying to register change. It may not exist in the filecache.'); |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 | |
@@ -197,9 +197,9 @@ discard block |
||
197 | 197 | return; |
198 | 198 | } |
199 | 199 | |
200 | - $text .= ' ' . $change->getPath(); |
|
200 | + $text .= ' '.$change->getPath(); |
|
201 | 201 | if ($change instanceof IRenameChange) { |
202 | - $text .= ' to ' . $change->getTargetPath(); |
|
202 | + $text .= ' to '.$change->getTargetPath(); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | $output->writeln($text); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | ->setFirstResult($start); |
145 | 145 | |
146 | 146 | if ($filter !== '') { |
147 | - $query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($filter) . '%'))); |
|
147 | + $query->where($query->expr()->iLike('c.name', $query->createNamedParameter('%'.$this->connection->escapeLikeParameter($filter).'%'))); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | $result = $query->execute(); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | while ($row = $result->fetch()) { |
155 | 155 | $foundResults++; |
156 | 156 | $access = $row['access'] === null ? null : (bool) $row['access']; |
157 | - $collection = new Collection($this, $this->connection, (int)$row['id'], (string)$row['name'], $user, $access); |
|
157 | + $collection = new Collection($this, $this->connection, (int) $row['id'], (string) $row['name'], $user, $access); |
|
158 | 158 | if ($collection->canAccess($user)) { |
159 | 159 | $collections[] = $collection; |
160 | 160 | } |