@@ -41,7 +41,7 @@ |
||
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | - return $prefix . implode('/', $tokens); |
|
44 | + return $prefix.implode('/', $tokens); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -205,7 +205,7 @@ |
||
205 | 205 | { |
206 | 206 | $this->ensureDirectoryExists($this->directory, $this->create); |
207 | 207 | |
208 | - return $this->normalizePath($this->directory . '/' . $key); |
|
208 | + return $this->normalizePath($this->directory.'/'.$key); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -58,7 +58,7 @@ |
||
58 | 58 | */ |
59 | 59 | public function keys() |
60 | 60 | { |
61 | - return array_map(function ($content) { |
|
61 | + return array_map(function($content) { |
|
62 | 62 | return $content['path']; |
63 | 63 | }, $this->adapter->listContents()); |
64 | 64 | } |
@@ -184,7 +184,7 @@ |
||
184 | 184 | |
185 | 185 | return [ |
186 | 186 | 'dirs' => [], |
187 | - 'keys' => array_map(function ($value) { |
|
187 | + 'keys' => array_map(function($value) { |
|
188 | 188 | return $value['_key']; |
189 | 189 | }, |
190 | 190 | $keys), |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | protected function computePath($key) |
202 | 202 | { |
203 | - return $this->directory . '/' . ltrim($key, '/'); |
|
203 | + return $this->directory.'/'.ltrim($key, '/'); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | protected function fetchKeys($directory = '', $onlyKeys = true) |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | continue; |
219 | 219 | } |
220 | 220 | |
221 | - $path = ltrim($directory . '/' . $filename, '/'); |
|
221 | + $path = ltrim($directory.'/'.$filename, '/'); |
|
222 | 222 | if (isset($stat['type']) && $stat['type'] === NET_SFTP_TYPE_DIRECTORY) { |
223 | 223 | $keys['dirs'][] = $path; |
224 | 224 | } else { |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | use AmazonS3 as AmazonClient; |
6 | 6 | use Gaufrette\Adapter; |
7 | 7 | |
8 | -@trigger_error('The ' . __NAMESPACE__ . '\AclAwareAmazonS3 adapter is deprecated since version 0.4 and will be removed in 1.0. Use the AwsS3 adapter instead.', E_USER_DEPRECATED); |
|
8 | +@trigger_error('The '.__NAMESPACE__.'\AclAwareAmazonS3 adapter is deprecated since version 0.4 and will be removed in 1.0. Use the AwsS3 adapter instead.', E_USER_DEPRECATED); |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Makes the AmazonS3 adapter ACL aware. Uses the AWS SDK for PHP v1.x. |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public function setAclConstant($constant) |
39 | 39 | { |
40 | - if (!defined($constant = 'AmazonS3::ACL_' . strtoupper($constant))) { |
|
40 | + if (!defined($constant = 'AmazonS3::ACL_'.strtoupper($constant))) { |
|
41 | 41 | throw new \InvalidArgumentException(sprintf('The ACL constant "%s" does not exist on AmazonS3.', $constant)); |
42 | 42 | } |
43 | 43 | |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | throw new \InvalidArgumentException(sprintf('setUsers() expects an array where each item contains a "permission" key, but got %s.', json_encode($user))); |
54 | 54 | } |
55 | 55 | |
56 | - if (!defined($constant = 'AmazonS3::GRANT_' . strtoupper($user['permission']))) { |
|
56 | + if (!defined($constant = 'AmazonS3::GRANT_'.strtoupper($user['permission']))) { |
|
57 | 57 | throw new \InvalidArgumentException('The permission must be the suffix for one of the AmazonS3::GRANT_ constants.'); |
58 | 58 | } |
59 | 59 | $user['permission'] = constant($constant); |
60 | 60 | |
61 | 61 | if (isset($user['group'])) { |
62 | - if (!defined($constant = 'AmazonS3::USERS_' . strtoupper($user['group']))) { |
|
62 | + if (!defined($constant = 'AmazonS3::USERS_'.strtoupper($user['group']))) { |
|
63 | 63 | throw new \InvalidArgumentException('The group must be the suffix for one of the AmazonS3::USERS_ constants.'); |
64 | 64 | } |
65 | 65 | $user['id'] = constant($constant); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | { |
192 | 192 | $response = $this->s3->set_object_acl($this->bucketName, $key, $this->getAcl()); |
193 | 193 | if (200 != $response->status) { |
194 | - throw new \RuntimeException('S3-ACL change failed: ' . print_r($response, true)); |
|
194 | + throw new \RuntimeException('S3-ACL change failed: '.print_r($response, true)); |
|
195 | 195 | } |
196 | 196 | } |
197 | 197 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | if (isset($this->metadata[$key])) { |
172 | 172 | return $this->metadata[$key]; |
173 | 173 | } |
174 | - $meta = $this->bucket->findOne(['filename' => $key], ['projection' => ['metadata' => 1,'_id' => 0]]); |
|
174 | + $meta = $this->bucket->findOne(['filename' => $key], ['projection' => ['metadata' => 1, '_id' => 0]]); |
|
175 | 175 | |
176 | 176 | if ($meta === null || !isset($meta['metadata'])) { |
177 | 177 | return []; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | if (!$this->exists($key)) { |
216 | 216 | return false; |
217 | 217 | } |
218 | - $size = $this->bucket->findOne(['filename' => $key], ['projection' => ['length' => 1,'_id' => 0]]); |
|
218 | + $size = $this->bucket->findOne(['filename' => $key], ['projection' => ['length' => 1, '_id' => 0]]); |
|
219 | 219 | if (!isset($size['length'])) { |
220 | 220 | return false; |
221 | 221 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $containersList = $this->blobProxy->listContainers(); |
274 | 274 | |
275 | 275 | return call_user_func_array('array_merge', array_map( |
276 | - function (Container $container) { |
|
276 | + function(Container $container) { |
|
277 | 277 | $containerName = $container->getName(); |
278 | 278 | |
279 | 279 | return $this->fetchBlobs($containerName, $containerName); |
@@ -567,10 +567,10 @@ discard block |
||
567 | 567 | $blobList = $this->blobProxy->listBlobs($containerName); |
568 | 568 | |
569 | 569 | return array_map( |
570 | - function (Blob $blob) use ($prefix) { |
|
570 | + function(Blob $blob) use ($prefix) { |
|
571 | 571 | $name = $blob->getName(); |
572 | 572 | if (null !== $prefix) { |
573 | - $name = $prefix . '/' . $name; |
|
573 | + $name = $prefix.'/'.$name; |
|
574 | 574 | } |
575 | 575 | |
576 | 576 | return $name; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | use Gaufrette\Adapter; |
7 | 7 | use Gaufrette\Adapter\InMemory as InMemoryAdapter; |
8 | 8 | |
9 | -@trigger_error('The ' . __NAMESPACE__ . '\Cache adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED); |
|
9 | +@trigger_error('The '.__NAMESPACE__.'\Cache adapter is deprecated since version 0.4 and will be removed in 1.0.', E_USER_DEPRECATED); |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Cache adapter. |