@@ -40,15 +40,15 @@ |
||
40 | 40 | public function getCalendarHomeForPrincipal($principalUrl) { |
41 | 41 | if (strrpos($principalUrl, 'principals/users', -strlen($principalUrl)) !== false) { |
42 | 42 | list(, $principalId) = \Sabre\Uri\split($principalUrl); |
43 | - return self::CALENDAR_ROOT . '/' . $principalId; |
|
43 | + return self::CALENDAR_ROOT.'/'.$principalId; |
|
44 | 44 | } |
45 | 45 | if (strrpos($principalUrl, 'principals/calendar-resources', -strlen($principalUrl)) !== false) { |
46 | 46 | list(, $principalId) = \Sabre\Uri\split($principalUrl); |
47 | - return self::SYSTEM_CALENDAR_ROOT . '/calendar-resources/' . $principalId; |
|
47 | + return self::SYSTEM_CALENDAR_ROOT.'/calendar-resources/'.$principalId; |
|
48 | 48 | } |
49 | 49 | if (strrpos($principalUrl, 'principals/calendar-rooms', -strlen($principalUrl)) !== false) { |
50 | 50 | list(, $principalId) = \Sabre\Uri\split($principalUrl); |
51 | - return self::SYSTEM_CALENDAR_ROOT . '/calendar-rooms/' . $principalId; |
|
51 | + return self::SYSTEM_CALENDAR_ROOT.'/calendar-rooms/'.$principalId; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | throw new Forbidden(); |
127 | 127 | } |
128 | 128 | } catch (StorageNotAvailableException $e) { |
129 | - throw new ServiceUnavailable("File is not updatable: " . $e->getMessage()); |
|
129 | + throw new ServiceUnavailable("File is not updatable: ".$e->getMessage()); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | // verify path of the target |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | if ($needsPartFile) { |
151 | 151 | // mark file as partial while uploading (ignored by the scanner) |
152 | - $partFilePath = $this->getPartFileBasePath($this->path) . '.ocTransferId' . rand() . '.part'; |
|
152 | + $partFilePath = $this->getPartFileBasePath($this->path).'.ocTransferId'.rand().'.part'; |
|
153 | 153 | |
154 | 154 | if (!$view->isCreatable($partFilePath) && $view->isUpdatable($this->path)) { |
155 | 155 | $needsPartFile = false; |
@@ -183,19 +183,19 @@ discard block |
||
183 | 183 | $data = $tmpData; |
184 | 184 | } |
185 | 185 | |
186 | - $data = HashWrapper::wrap($data, 'md5', function ($hash) { |
|
187 | - $this->header('X-Hash-MD5: ' . $hash); |
|
186 | + $data = HashWrapper::wrap($data, 'md5', function($hash) { |
|
187 | + $this->header('X-Hash-MD5: '.$hash); |
|
188 | 188 | }); |
189 | - $data = HashWrapper::wrap($data, 'sha1', function ($hash) { |
|
190 | - $this->header('X-Hash-SHA1: ' . $hash); |
|
189 | + $data = HashWrapper::wrap($data, 'sha1', function($hash) { |
|
190 | + $this->header('X-Hash-SHA1: '.$hash); |
|
191 | 191 | }); |
192 | - $data = HashWrapper::wrap($data, 'sha256', function ($hash) { |
|
193 | - $this->header('X-Hash-SHA256: ' . $hash); |
|
192 | + $data = HashWrapper::wrap($data, 'sha256', function($hash) { |
|
193 | + $this->header('X-Hash-SHA256: '.$hash); |
|
194 | 194 | }); |
195 | 195 | |
196 | 196 | if ($partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) { |
197 | 197 | $isEOF = false; |
198 | - $wrappedData = CallbackWrapper::wrap($data, null, null, null, null, function ($stream) use (&$isEOF) { |
|
198 | + $wrappedData = CallbackWrapper::wrap($data, null, null, null, null, function($stream) use (&$isEOF) { |
|
199 | 199 | $isEOF = feof($stream); |
200 | 200 | }); |
201 | 201 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $expected = $_SERVER['CONTENT_LENGTH']; |
226 | 226 | } |
227 | 227 | if ($expected !== "0") { |
228 | - throw new Exception('Error while copying file to target location (copied bytes: ' . $count . ', expected filesize: ' . $expected . ' )'); |
|
228 | + throw new Exception('Error while copying file to target location (copied bytes: '.$count.', expected filesize: '.$expected.' )'); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | |
@@ -233,9 +233,9 @@ discard block |
||
233 | 233 | // double check if the file was fully received |
234 | 234 | // compare expected and actual size |
235 | 235 | if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { |
236 | - $expected = (int)$_SERVER['CONTENT_LENGTH']; |
|
236 | + $expected = (int) $_SERVER['CONTENT_LENGTH']; |
|
237 | 237 | if ($count !== $expected) { |
238 | - throw new BadRequest('Expected filesize of ' . $expected . ' bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) ' . $count . ' bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.'); |
|
238 | + throw new BadRequest('Expected filesize of '.$expected.' bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) '.$count.' bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.'); |
|
239 | 239 | } |
240 | 240 | } |
241 | 241 | } catch (\Exception $e) { |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $renameOkay = $storage->moveFromStorage($partStorage, $internalPartPath, $internalPath); |
285 | 285 | $fileExists = $storage->file_exists($internalPath); |
286 | 286 | if ($renameOkay === false || $fileExists === false) { |
287 | - \OC::$server->getLogger()->error('renaming part file to final file failed $renameOkay: ' . ($renameOkay ? 'true' : 'false') . ', $fileExists: ' . ($fileExists ? 'true' : 'false') . ')', ['app' => 'webdav']); |
|
287 | + \OC::$server->getLogger()->error('renaming part file to final file failed $renameOkay: '.($renameOkay ? 'true' : 'false').', $fileExists: '.($fileExists ? 'true' : 'false').')', ['app' => 'webdav']); |
|
288 | 288 | throw new Exception('Could not rename part file to final file'); |
289 | 289 | } |
290 | 290 | } catch (ForbiddenException $ex) { |
@@ -340,10 +340,10 @@ discard block |
||
340 | 340 | $this->refreshInfo(); |
341 | 341 | } |
342 | 342 | } catch (StorageNotAvailableException $e) { |
343 | - throw new ServiceUnavailable("Failed to check file size: " . $e->getMessage(), 0, $e); |
|
343 | + throw new ServiceUnavailable("Failed to check file size: ".$e->getMessage(), 0, $e); |
|
344 | 344 | } |
345 | 345 | |
346 | - return '"' . $this->info->getEtag() . '"'; |
|
346 | + return '"'.$this->info->getEtag().'"'; |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | private function getPartFileBasePath($path) { |
@@ -430,9 +430,9 @@ discard block |
||
430 | 430 | return $res; |
431 | 431 | } catch (GenericEncryptionException $e) { |
432 | 432 | // returning 503 will allow retry of the operation at a later point in time |
433 | - throw new ServiceUnavailable("Encryption not ready: " . $e->getMessage()); |
|
433 | + throw new ServiceUnavailable("Encryption not ready: ".$e->getMessage()); |
|
434 | 434 | } catch (StorageNotAvailableException $e) { |
435 | - throw new ServiceUnavailable("Failed to open file: " . $e->getMessage()); |
|
435 | + throw new ServiceUnavailable("Failed to open file: ".$e->getMessage()); |
|
436 | 436 | } catch (ForbiddenException $ex) { |
437 | 437 | throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
438 | 438 | } catch (LockedException $e) { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | throw new Forbidden(); |
458 | 458 | } |
459 | 459 | } catch (StorageNotAvailableException $e) { |
460 | - throw new ServiceUnavailable("Failed to unlink: " . $e->getMessage()); |
|
460 | + throw new ServiceUnavailable("Failed to unlink: ".$e->getMessage()); |
|
461 | 461 | } catch (ForbiddenException $ex) { |
462 | 462 | throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
463 | 463 | } catch (LockedException $e) { |
@@ -520,10 +520,10 @@ discard block |
||
520 | 520 | //detect aborted upload |
521 | 521 | if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { |
522 | 522 | if (isset($_SERVER['CONTENT_LENGTH'])) { |
523 | - $expected = (int)$_SERVER['CONTENT_LENGTH']; |
|
523 | + $expected = (int) $_SERVER['CONTENT_LENGTH']; |
|
524 | 524 | if ($bytesWritten !== $expected) { |
525 | 525 | $chunk_handler->remove($info['index']); |
526 | - throw new BadRequest('Expected filesize of ' . $expected . ' bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) ' . $bytesWritten . ' bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.'); |
|
526 | + throw new BadRequest('Expected filesize of '.$expected.' bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) '.$bytesWritten.' bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.'); |
|
527 | 527 | } |
528 | 528 | } |
529 | 529 | } |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | $needsPartFile = $storage->needsPartFile(); |
535 | 535 | $partFile = null; |
536 | 536 | |
537 | - $targetPath = $path . '/' . $info['name']; |
|
537 | + $targetPath = $path.'/'.$info['name']; |
|
538 | 538 | /** @var \OC\Files\Storage\Storage $targetStorage */ |
539 | 539 | list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); |
540 | 540 | |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | |
551 | 551 | if ($needsPartFile) { |
552 | 552 | // we first assembly the target file as a part file |
553 | - $partFile = $this->getPartFileBasePath($path . '/' . $info['name']) . '.ocTransferId' . $info['transferid'] . '.part'; |
|
553 | + $partFile = $this->getPartFileBasePath($path.'/'.$info['name']).'.ocTransferId'.$info['transferid'].'.part'; |
|
554 | 554 | /** @var \OC\Files\Storage\Storage $targetStorage */ |
555 | 555 | list($partStorage, $partInternalPath) = $this->fileView->resolvePath($partFile); |
556 | 556 | |
@@ -654,13 +654,13 @@ discard block |
||
654 | 654 | } |
655 | 655 | if ($e instanceof GenericEncryptionException) { |
656 | 656 | // returning 503 will allow retry of the operation at a later point in time |
657 | - throw new ServiceUnavailable('Encryption not ready: ' . $e->getMessage(), 0, $e); |
|
657 | + throw new ServiceUnavailable('Encryption not ready: '.$e->getMessage(), 0, $e); |
|
658 | 658 | } |
659 | 659 | if ($e instanceof StorageNotAvailableException) { |
660 | - throw new ServiceUnavailable('Failed to write file contents: ' . $e->getMessage(), 0, $e); |
|
660 | + throw new ServiceUnavailable('Failed to write file contents: '.$e->getMessage(), 0, $e); |
|
661 | 661 | } |
662 | 662 | if ($e instanceof NotFoundException) { |
663 | - throw new NotFound('File not found: ' . $e->getMessage(), 0, $e); |
|
663 | + throw new NotFound('File not found: '.$e->getMessage(), 0, $e); |
|
664 | 664 | } |
665 | 665 | |
666 | 666 | throw new \Sabre\DAV\Exception($e->getMessage(), 0, $e); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | public function getSubscription(string $principalUri, string $uri) { |
168 | 168 | $subscriptions = array_values(array_filter( |
169 | 169 | $this->calDavBackend->getSubscriptionsForUser($principalUri), |
170 | - function ($sub) use ($uri) { |
|
170 | + function($sub) use ($uri) { |
|
171 | 171 | return $sub['uri'] === $uri; |
172 | 172 | } |
173 | 173 | )); |
@@ -193,12 +193,12 @@ discard block |
||
193 | 193 | $latestLocation = null; |
194 | 194 | |
195 | 195 | $handlerStack = HandlerStack::create(); |
196 | - $handlerStack->push(Middleware::mapRequest(function (RequestInterface $request) { |
|
196 | + $handlerStack->push(Middleware::mapRequest(function(RequestInterface $request) { |
|
197 | 197 | return $request |
198 | 198 | ->withHeader('Accept', 'text/calendar, application/calendar+json, application/calendar+xml') |
199 | 199 | ->withHeader('User-Agent', 'Nextcloud Webcal Crawler'); |
200 | 200 | })); |
201 | - $handlerStack->push(Middleware::mapResponse(function (ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { |
|
201 | + $handlerStack->push(Middleware::mapResponse(function(ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { |
|
202 | 202 | if (!$didBreak301Chain) { |
203 | 203 | if ($response->getStatusCode() !== 301) { |
204 | 204 | $didBreak301Chain = true; |
@@ -372,10 +372,10 @@ discard block |
||
372 | 372 | } |
373 | 373 | |
374 | 374 | $host = $parsed['host'] ?? ''; |
375 | - $port = isset($parsed['port']) ? ':' . $parsed['port'] : ''; |
|
375 | + $port = isset($parsed['port']) ? ':'.$parsed['port'] : ''; |
|
376 | 376 | $path = $parsed['path'] ?? ''; |
377 | - $query = isset($parsed['query']) ? '?' . $parsed['query'] : ''; |
|
378 | - $fragment = isset($parsed['fragment']) ? '#' . $parsed['fragment'] : ''; |
|
377 | + $query = isset($parsed['query']) ? '?'.$parsed['query'] : ''; |
|
378 | + $fragment = isset($parsed['fragment']) ? '#'.$parsed['fragment'] : ''; |
|
379 | 379 | |
380 | 380 | $cleanURL = "$scheme://$host$port$path$query$fragment"; |
381 | 381 | // parse_url is giving some weird results if no url and no :// is given, |
@@ -394,6 +394,6 @@ discard block |
||
394 | 394 | * @return string |
395 | 395 | */ |
396 | 396 | public function getRandomCalendarObjectUri():string { |
397 | - return UUIDUtil::getUUID() . '.ics'; |
|
397 | + return UUIDUtil::getUUID().'.ics'; |
|
398 | 398 | } |
399 | 399 | } |
@@ -28,9 +28,9 @@ |
||
28 | 28 | trait TLinkId { |
29 | 29 | public function getLinkId($link) { |
30 | 30 | if (is_resource($link)) { |
31 | - return (int)$link; |
|
31 | + return (int) $link; |
|
32 | 32 | } elseif (is_array($link) && isset($link[0]) && is_resource($link[0])) { |
33 | - return (int)$link[0]; |
|
33 | + return (int) $link[0]; |
|
34 | 34 | } |
35 | 35 | throw new \RuntimeException('No resource provided'); |
36 | 36 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $update = false; |
136 | 136 | if (!isset($properties['URI'])) { // create a new contact |
137 | 137 | $uid = $this->createUid(); |
138 | - $uri = $uid . '.vcf'; |
|
138 | + $uri = $uid.'.vcf'; |
|
139 | 139 | $vCard = $this->createEmptyVCard($uid); |
140 | 140 | } else { // update existing contact |
141 | 141 | $uri = $properties['URI']; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | protected function createUid() { |
211 | 211 | do { |
212 | 212 | $uid = $this->getUid(); |
213 | - $contact = $this->backend->getContact($this->getKey(), $uid . '.vcf'); |
|
213 | + $contact = $this->backend->getContact($this->getKey(), $uid.'.vcf'); |
|
214 | 214 | } while (!empty($contact)); |
215 | 215 | |
216 | 216 | return $uid; |
@@ -251,15 +251,15 @@ discard block |
||
251 | 251 | foreach ($vCard->children() as $property) { |
252 | 252 | if ($property->name === 'PHOTO' && $property->getValueType() === 'BINARY') { |
253 | 253 | $url = $this->urlGenerator->getAbsoluteURL( |
254 | - $this->urlGenerator->linkTo('', 'remote.php') . '/dav/'); |
|
254 | + $this->urlGenerator->linkTo('', 'remote.php').'/dav/'); |
|
255 | 255 | $url .= implode('/', [ |
256 | 256 | 'addressbooks', |
257 | 257 | substr($this->addressBookInfo['principaluri'], 11), //cut off 'principals/' |
258 | 258 | $this->addressBookInfo['uri'], |
259 | 259 | $uri |
260 | - ]) . '?photo'; |
|
260 | + ]).'?photo'; |
|
261 | 261 | |
262 | - $result['PHOTO'] = 'VALUE=uri:' . $url; |
|
262 | + $result['PHOTO'] = 'VALUE=uri:'.$url; |
|
263 | 263 | } elseif (in_array($property->name, ['URL', 'GEO', 'CLOUD', 'ADR', 'EMAIL', 'IMPP', 'TEL', 'X-SOCIALPROFILE', 'RELATED', 'LANG', 'X-ADDRESSBOOKSERVER-MEMBER'])) { |
264 | 264 | if (!isset($result[$property->name])) { |
265 | 265 | $result[$property->name] = []; |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $ns = '{http://nextcloud.com/ns}'; |
61 | 61 | |
62 | 62 | if ($node instanceof Card) { |
63 | - $propFind->handle($ns . 'has-photo', function () use ($node) { |
|
63 | + $propFind->handle($ns.'has-photo', function() use ($node) { |
|
64 | 64 | $vcard = Reader::read($node->get()); |
65 | 65 | return $vcard instanceof VCard |
66 | 66 | && $vcard->PHOTO |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function run($argument) { |
65 | 65 | foreach ($this->getDeletedFiles() as $fileId) { |
66 | 66 | try { |
67 | - $preview = $this->previewFolder->getFolder((string)$fileId); |
|
67 | + $preview = $this->previewFolder->getFolder((string) $fileId); |
|
68 | 68 | $preview->delete(); |
69 | 69 | } catch (NotFoundException $e) { |
70 | 70 | // continue |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * We take the md5 of the name (fileid) and split the first 7 chars. That way |
126 | 126 | * there are not a gazillion files in the root of the preview appdata. |
127 | 127 | */ |
128 | - $like = $this->connection->escapeLikeParameter($data['path']) . '/_/_/_/_/_/_/_/%'; |
|
128 | + $like = $this->connection->escapeLikeParameter($data['path']).'/_/_/_/_/_/_/_/%'; |
|
129 | 129 | |
130 | 130 | $qb = $this->connection->getQueryBuilder(); |
131 | 131 | $qb->select('a.name') |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | public function getDirectoryContent($directory): \Traversable { |
206 | 206 | $parent = rtrim($directory, '/'); |
207 | 207 | foreach ($this->getWrapperStorage()->getDirectoryContent($directory) as $data) { |
208 | - yield $this->modifyMetaData($parent . '/' . $data['name'], $data); |
|
208 | + yield $this->modifyMetaData($parent.'/'.$data['name'], $data); |
|
209 | 209 | } |
210 | 210 | } |
211 | 211 | |
@@ -377,8 +377,8 @@ discard block |
||
377 | 377 | // check if the file is stored in the array cache, this means that we |
378 | 378 | // copy a file over to the versions folder, in this case we don't want to |
379 | 379 | // decrypt it |
380 | - if ($this->arrayCache->hasKey('encryption_copy_version_' . $path)) { |
|
381 | - $this->arrayCache->remove('encryption_copy_version_' . $path); |
|
380 | + if ($this->arrayCache->hasKey('encryption_copy_version_'.$path)) { |
|
381 | + $this->arrayCache->remove('encryption_copy_version_'.$path); |
|
382 | 382 | return $this->storage->fopen($path, $mode); |
383 | 383 | } |
384 | 384 | |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | } |
452 | 452 | } catch (ModuleDoesNotExistsException $e) { |
453 | 453 | $this->logger->logException($e, [ |
454 | - 'message' => 'Encryption module "' . $encryptionModuleId . '" not found, file will be stored unencrypted', |
|
454 | + 'message' => 'Encryption module "'.$encryptionModuleId.'" not found, file will be stored unencrypted', |
|
455 | 455 | 'level' => ILogger::WARN, |
456 | 456 | 'app' => 'core', |
457 | 457 | ]); |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | try { |
505 | 505 | $result = $this->fixUnencryptedSize($path, $size, $unencryptedSize); |
506 | 506 | } catch (\Exception $e) { |
507 | - $this->logger->error('Couldn\'t re-calculate unencrypted size for ' . $path); |
|
507 | + $this->logger->error('Couldn\'t re-calculate unencrypted size for '.$path); |
|
508 | 508 | $this->logger->logException($e); |
509 | 509 | } |
510 | 510 | unset($this->fixUnencryptedSizeOf[$this->getFullPath($path)]); |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | |
533 | 533 | // if we couldn't open the file we return the old unencrypted size |
534 | 534 | if (!is_resource($stream)) { |
535 | - $this->logger->error('Could not open ' . $path . '. Recalculation of unencrypted size aborted.'); |
|
535 | + $this->logger->error('Could not open '.$path.'. Recalculation of unencrypted size aborted.'); |
|
536 | 536 | return $unencryptedSize; |
537 | 537 | } |
538 | 538 | |
@@ -582,8 +582,8 @@ discard block |
||
582 | 582 | |
583 | 583 | // we have to decrypt the last chunk to get it actual size |
584 | 584 | $encryptionModule->begin($this->getFullPath($path), $this->uid, 'r', $header, []); |
585 | - $decryptedLastChunk = $encryptionModule->decrypt($lastChunkContentEncrypted, $lastChunkNr . 'end'); |
|
586 | - $decryptedLastChunk .= $encryptionModule->end($this->getFullPath($path), $lastChunkNr . 'end'); |
|
585 | + $decryptedLastChunk = $encryptionModule->decrypt($lastChunkContentEncrypted, $lastChunkNr.'end'); |
|
586 | + $decryptedLastChunk .= $encryptionModule->end($this->getFullPath($path), $lastChunkNr.'end'); |
|
587 | 587 | |
588 | 588 | // calc the real file size with the size of the last chunk |
589 | 589 | $newUnencryptedSize += strlen($decryptedLastChunk); |
@@ -711,9 +711,9 @@ discard block |
||
711 | 711 | // remember that we try to create a version so that we can detect it during |
712 | 712 | // fopen($sourceInternalPath) and by-pass the encryption in order to |
713 | 713 | // create a 1:1 copy of the file |
714 | - $this->arrayCache->set('encryption_copy_version_' . $sourceInternalPath, true); |
|
714 | + $this->arrayCache->set('encryption_copy_version_'.$sourceInternalPath, true); |
|
715 | 715 | $result = $this->storage->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath); |
716 | - $this->arrayCache->remove('encryption_copy_version_' . $sourceInternalPath); |
|
716 | + $this->arrayCache->remove('encryption_copy_version_'.$sourceInternalPath); |
|
717 | 717 | if ($result) { |
718 | 718 | $info = $this->getCache('', $sourceStorage)->get($sourceInternalPath); |
719 | 719 | // make sure that we update the unencrypted size for the version |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $mount = $this->mountManager->findByStorageId($sourceStorage->getId()); |
734 | 734 | if (count($mount) === 1) { |
735 | 735 | $mountPoint = $mount[0]->getMountPoint(); |
736 | - $source = $mountPoint . '/' . $sourceInternalPath; |
|
736 | + $source = $mountPoint.'/'.$sourceInternalPath; |
|
737 | 737 | $target = $this->getFullPath($targetInternalPath); |
738 | 738 | $this->copyKeys($source, $target); |
739 | 739 | } else { |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | if (is_resource($dh)) { |
747 | 747 | while ($result and ($file = readdir($dh)) !== false) { |
748 | 748 | if (!Filesystem::isIgnoredDir($file)) { |
749 | - $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename); |
|
749 | + $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath.'/'.$file, $targetInternalPath.'/'.$file, false, $isRename); |
|
750 | 750 | } |
751 | 751 | } |
752 | 752 | } |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | $this->getCache()->remove($targetInternalPath); |
775 | 775 | } |
776 | 776 | } |
777 | - return (bool)$result; |
|
777 | + return (bool) $result; |
|
778 | 778 | } |
779 | 779 | |
780 | 780 | /** |
@@ -844,7 +844,7 @@ discard block |
||
844 | 844 | * @return string full path including mount point |
845 | 845 | */ |
846 | 846 | protected function getFullPath($path) { |
847 | - return Filesystem::normalizePath($this->mountPoint . '/' . $path); |
|
847 | + return Filesystem::normalizePath($this->mountPoint.'/'.$path); |
|
848 | 848 | } |
849 | 849 | |
850 | 850 | /** |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | try { |
964 | 964 | $encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId); |
965 | 965 | } catch (ModuleDoesNotExistsException $e) { |
966 | - $this->logger->critical('Encryption module defined in "' . $path . '" not loaded!'); |
|
966 | + $this->logger->critical('Encryption module defined in "'.$path.'" not loaded!'); |
|
967 | 967 | throw $e; |
968 | 968 | } |
969 | 969 | } |
@@ -168,7 +168,7 @@ |
||
168 | 168 | if (substr($class, -10) === 'Controller') { |
169 | 169 | $class = substr($class, 0, -10); |
170 | 170 | } |
171 | - return $app .'.'. $class .'.'. $function; |
|
171 | + return $app.'.'.$class.'.'.$function; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |