@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | * @param array $params |
143 | 143 | */ |
144 | 144 | public function updateLegacyId(array $params) { |
145 | - $oldId = 'amazon::' . $params['key'] . md5($params['secret']); |
|
145 | + $oldId = 'amazon::'.$params['key'].md5($params['secret']); |
|
146 | 146 | |
147 | 147 | // find by old id or bucket |
148 | 148 | $stmt = \OC::$server->getDatabaseConnection()->prepare( |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | try { |
195 | 195 | $this->getConnection()->putObject(array( |
196 | 196 | 'Bucket' => $this->bucket, |
197 | - 'Key' => $path . '/', |
|
197 | + 'Key' => $path.'/', |
|
198 | 198 | 'Body' => '', |
199 | 199 | 'ContentType' => 'httpd/unix-directory' |
200 | 200 | )); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | 'Bucket' => $this->bucket |
246 | 246 | ); |
247 | 247 | if ($path !== null) { |
248 | - $params['Prefix'] = $path . '/'; |
|
248 | + $params['Prefix'] = $path.'/'; |
|
249 | 249 | } |
250 | 250 | try { |
251 | 251 | $connection = $this->getConnection(); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | // store this information for later usage |
312 | 312 | $this->filesCache[$file] = [ |
313 | 313 | 'ContentLength' => $object['Size'], |
314 | - 'LastModified' => (string)$object['LastModified'], |
|
314 | + 'LastModified' => (string) $object['LastModified'], |
|
315 | 315 | ]; |
316 | 316 | } |
317 | 317 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | public function is_dir($path) { |
394 | 394 | $path = $this->normalizePath($path); |
395 | 395 | try { |
396 | - return $this->isRoot($path) || $this->headObject($path . '/'); |
|
396 | + return $this->isRoot($path) || $this->headObject($path.'/'); |
|
397 | 397 | } catch (S3Exception $e) { |
398 | 398 | \OC::$server->getLogger()->logException($e, ['app' => 'files_external']); |
399 | 399 | return false; |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | if ($this->headObject($path)) { |
412 | 412 | return 'file'; |
413 | 413 | } |
414 | - if ($this->headObject($path . '/')) { |
|
414 | + if ($this->headObject($path.'/')) { |
|
415 | 415 | return 'dir'; |
416 | 416 | } |
417 | 417 | } catch (S3Exception $e) { |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); |
466 | 466 | |
467 | 467 | $handle = fopen($tmpFile, 'w'); |
468 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
468 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
469 | 469 | $this->writeBack($tmpFile, $path); |
470 | 470 | }); |
471 | 471 | case 'a': |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | } |
491 | 491 | |
492 | 492 | $handle = fopen($tmpFile, $mode); |
493 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
493 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
494 | 494 | $this->writeBack($tmpFile, $path); |
495 | 495 | }); |
496 | 496 | } |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | 'Bucket' => $this->bucket, |
519 | 519 | 'Key' => $this->cleanKey($path), |
520 | 520 | 'Metadata' => $metadata, |
521 | - 'CopySource' => $this->bucket . '/' . $path, |
|
521 | + 'CopySource' => $this->bucket.'/'.$path, |
|
522 | 522 | 'MetadataDirective' => 'REPLACE', |
523 | 523 | ]); |
524 | 524 | $this->testTimeout(); |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | $this->getConnection()->copyObject(array( |
553 | 553 | 'Bucket' => $this->bucket, |
554 | 554 | 'Key' => $this->cleanKey($path2), |
555 | - 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1) |
|
555 | + 'CopySource' => S3Client::encodeKey($this->bucket.'/'.$path1) |
|
556 | 556 | )); |
557 | 557 | $this->testTimeout(); |
558 | 558 | } catch (S3Exception $e) { |
@@ -565,8 +565,8 @@ discard block |
||
565 | 565 | try { |
566 | 566 | $this->getConnection()->copyObject(array( |
567 | 567 | 'Bucket' => $this->bucket, |
568 | - 'Key' => $path2 . '/', |
|
569 | - 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1 . '/') |
|
568 | + 'Key' => $path2.'/', |
|
569 | + 'CopySource' => S3Client::encodeKey($this->bucket.'/'.$path1.'/') |
|
570 | 570 | )); |
571 | 571 | $this->testTimeout(); |
572 | 572 | } catch (S3Exception $e) { |
@@ -581,8 +581,8 @@ discard block |
||
581 | 581 | continue; |
582 | 582 | } |
583 | 583 | |
584 | - $source = $path1 . '/' . $file; |
|
585 | - $target = $path2 . '/' . $file; |
|
584 | + $source = $path1.'/'.$file; |
|
585 | + $target = $path2.'/'.$file; |
|
586 | 586 | $this->copy($source, $target); |
587 | 587 | } |
588 | 588 | } |