@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | 'Delimiter' => '/', |
167 | 167 | ]); |
168 | 168 | |
169 | - if ((isset($result['Contents'][0]['Key']) && $result['Contents'][0]['Key'] === rtrim($path, '/') . '/') |
|
169 | + if ((isset($result['Contents'][0]['Key']) && $result['Contents'][0]['Key'] === rtrim($path, '/').'/') |
|
170 | 170 | || isset($result['CommonPrefixes'])) { |
171 | 171 | $this->directoryCache[$path] = true; |
172 | 172 | } else { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * @param array $params |
191 | 191 | */ |
192 | 192 | public function updateLegacyId(array $params) { |
193 | - $oldId = 'amazon::' . $params['key'] . md5($params['secret']); |
|
193 | + $oldId = 'amazon::'.$params['key'].md5($params['secret']); |
|
194 | 194 | |
195 | 195 | // find by old id or bucket |
196 | 196 | $stmt = \OC::$server->getDatabaseConnection()->prepare( |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | try { |
243 | 243 | $this->getConnection()->putObject([ |
244 | 244 | 'Bucket' => $this->bucket, |
245 | - 'Key' => $path . '/', |
|
245 | + 'Key' => $path.'/', |
|
246 | 246 | 'Body' => '', |
247 | 247 | 'ContentType' => 'httpd/unix-directory' |
248 | 248 | ]); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | 'Bucket' => $this->bucket |
294 | 294 | ]; |
295 | 295 | if ($path !== null) { |
296 | - $params['Prefix'] = $path . '/'; |
|
296 | + $params['Prefix'] = $path.'/'; |
|
297 | 297 | } |
298 | 298 | try { |
299 | 299 | $connection = $this->getConnection(); |
@@ -359,9 +359,9 @@ discard block |
||
359 | 359 | $files[] = $file; |
360 | 360 | |
361 | 361 | // store this information for later usage |
362 | - $this->filesCache[$path . $file] = [ |
|
362 | + $this->filesCache[$path.$file] = [ |
|
363 | 363 | 'ContentLength' => $object['Size'], |
364 | - 'LastModified' => (string)$object['LastModified'], |
|
364 | + 'LastModified' => (string) $object['LastModified'], |
|
365 | 365 | ]; |
366 | 366 | } |
367 | 367 | } |
@@ -412,12 +412,12 @@ discard block |
||
412 | 412 | */ |
413 | 413 | private function getContentLength($path) { |
414 | 414 | if (isset($this->filesCache[$path])) { |
415 | - return (int)$this->filesCache[$path]['ContentLength']; |
|
415 | + return (int) $this->filesCache[$path]['ContentLength']; |
|
416 | 416 | } |
417 | 417 | |
418 | 418 | $result = $this->headObject($path); |
419 | 419 | if (isset($result['ContentLength'])) { |
420 | - return (int)$result['ContentLength']; |
|
420 | + return (int) $result['ContentLength']; |
|
421 | 421 | } |
422 | 422 | |
423 | 423 | return 0; |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); |
532 | 532 | |
533 | 533 | $handle = fopen($tmpFile, 'w'); |
534 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
534 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
535 | 535 | $this->writeBack($tmpFile, $path); |
536 | 536 | }); |
537 | 537 | case 'a': |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | } |
557 | 557 | |
558 | 558 | $handle = fopen($tmpFile, $mode); |
559 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
559 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
560 | 560 | $this->writeBack($tmpFile, $path); |
561 | 561 | }); |
562 | 562 | } |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | $this->getConnection()->copyObject([ |
603 | 603 | 'Bucket' => $this->bucket, |
604 | 604 | 'Key' => $this->cleanKey($path2), |
605 | - 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1) |
|
605 | + 'CopySource' => S3Client::encodeKey($this->bucket.'/'.$path1) |
|
606 | 606 | ]); |
607 | 607 | $this->testTimeout(); |
608 | 608 | } catch (S3Exception $e) { |
@@ -615,8 +615,8 @@ discard block |
||
615 | 615 | try { |
616 | 616 | $this->getConnection()->copyObject([ |
617 | 617 | 'Bucket' => $this->bucket, |
618 | - 'Key' => $path2 . '/', |
|
619 | - 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1 . '/') |
|
618 | + 'Key' => $path2.'/', |
|
619 | + 'CopySource' => S3Client::encodeKey($this->bucket.'/'.$path1.'/') |
|
620 | 620 | ]); |
621 | 621 | $this->testTimeout(); |
622 | 622 | } catch (S3Exception $e) { |
@@ -631,8 +631,8 @@ discard block |
||
631 | 631 | continue; |
632 | 632 | } |
633 | 633 | |
634 | - $source = $path1 . '/' . $file; |
|
635 | - $target = $path2 . '/' . $file; |
|
634 | + $source = $path1.'/'.$file; |
|
635 | + $target = $path2.'/'.$file; |
|
636 | 636 | $this->copy($source, $target); |
637 | 637 | } |
638 | 638 | } |