@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * {@inheritdoc} |
29 | 29 | */ |
30 | - public function read(string $key): string|bool |
|
30 | + public function read(string $key): string | bool |
|
31 | 31 | { |
32 | 32 | return $this->adapter->read($key)['contents']; |
33 | 33 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * {@inheritdoc} |
37 | 37 | */ |
38 | - public function write(string $key, mixed $content): int|bool |
|
38 | + public function write(string $key, mixed $content): int | bool |
|
39 | 39 | { |
40 | 40 | return $this->adapter->write($key, $content, $this->config); |
41 | 41 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function keys(): array |
55 | 55 | { |
56 | - return array_map(function ($content) { |
|
56 | + return array_map(function($content) { |
|
57 | 57 | return $content['path']; |
58 | 58 | }, $this->adapter->listContents()); |
59 | 59 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | /** |
86 | 86 | * {@inheritdoc} |
87 | 87 | */ |
88 | - public function mtime(string $key): int|bool |
|
88 | + public function mtime(string $key): int | bool |
|
89 | 89 | { |
90 | 90 | return $this->adapter->getTimestamp($key); |
91 | 91 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * {@inheritdoc} |
116 | 116 | */ |
117 | - public function read(string $key): string|bool |
|
117 | + public function read(string $key): string | bool |
|
118 | 118 | { |
119 | 119 | $this->init(); |
120 | 120 | list($containerName, $key) = $this->tokenizeKey($key); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | /** |
134 | 134 | * {@inheritdoc} |
135 | 135 | */ |
136 | - public function write(string $key, mixed $content): int|bool |
|
136 | + public function write(string $key, mixed $content): int | bool |
|
137 | 137 | { |
138 | 138 | $this->init(); |
139 | 139 | list($containerName, $key) = $this->tokenizeKey($key); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $containersList = $this->blobProxy->listContainers(); |
222 | 222 | |
223 | 223 | return call_user_func_array('array_merge', array_map( |
224 | - function (Container $container) { |
|
224 | + function(Container $container) { |
|
225 | 225 | $containerName = $container->getName(); |
226 | 226 | |
227 | 227 | return $this->fetchBlobs($containerName, $containerName); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | /** |
248 | 248 | * {@inheritdoc} |
249 | 249 | */ |
250 | - public function mtime(string $key): int|bool |
|
250 | + public function mtime(string $key): int | bool |
|
251 | 251 | { |
252 | 252 | $this->init(); |
253 | 253 | list($containerName, $key) = $this->tokenizeKey($key); |
@@ -508,10 +508,10 @@ discard block |
||
508 | 508 | $blobList = $this->blobProxy->listBlobs($containerName); |
509 | 509 | |
510 | 510 | return array_map( |
511 | - function (Blob $blob) use ($prefix) { |
|
511 | + function(Blob $blob) use ($prefix) { |
|
512 | 512 | $name = $blob->getName(); |
513 | 513 | if (null !== $prefix) { |
514 | - $name = $prefix . '/' . $name; |
|
514 | + $name = $prefix.'/'.$name; |
|
515 | 515 | } |
516 | 516 | |
517 | 517 | return $name; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * {@inheritdoc} |
65 | 65 | */ |
66 | - public function read(string $key): string|bool |
|
66 | + public function read(string $key): string | bool |
|
67 | 67 | { |
68 | 68 | $this->ensureBucketExists(); |
69 | 69 | $options = $this->getOptions($key); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->ensureBucketExists(); |
93 | 93 | $options = $this->getOptions( |
94 | 94 | $targetKey, |
95 | - ['CopySource' => $this->bucket . '/' . $this->computePath($sourceKey)] |
|
95 | + ['CopySource' => $this->bucket.'/'.$this->computePath($sourceKey)] |
|
96 | 96 | ); |
97 | 97 | |
98 | 98 | try { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * {@inheritdoc} |
109 | 109 | */ |
110 | - public function write(string $key, mixed $content): int|bool |
|
110 | + public function write(string $key, mixed $content): int | bool |
|
111 | 111 | { |
112 | 112 | $this->ensureBucketExists(); |
113 | 113 | $options = $this->getOptions($key, ['Body' => $content]); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * {@inheritdoc} |
146 | 146 | */ |
147 | - public function mtime(string $key): int|bool |
|
147 | + public function mtime(string $key): int | bool |
|
148 | 148 | { |
149 | 149 | try { |
150 | 150 | $result = $this->service->headObject($this->getOptions($key)); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | { |
233 | 233 | $result = $this->service->listObjects([ |
234 | 234 | 'Bucket' => $this->bucket, |
235 | - 'Prefix' => rtrim($this->computePath($key), '/') . '/', |
|
235 | + 'Prefix' => rtrim($this->computePath($key), '/').'/', |
|
236 | 236 | 'MaxKeys' => 1, |
237 | 237 | ]); |
238 | 238 | if (isset($result['Contents'])) { |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | return ltrim(substr($path, strlen($this->options['directory'])), '/'); |
312 | 312 | } |
313 | 313 | |
314 | - private function guessContentType(mixed $content): false|string |
|
314 | + private function guessContentType(mixed $content): false | string |
|
315 | 315 | { |
316 | 316 | $fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
317 | 317 |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | /** |
77 | 77 | * {@inheritdoc} |
78 | 78 | */ |
79 | - public function mtime(string $key): int|bool |
|
79 | + public function mtime(string $key): int | bool |
|
80 | 80 | { |
81 | 81 | return $this->getColumnValue($key, 'mtime'); |
82 | 82 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | /** |
114 | 114 | * {@inheritdoc} |
115 | 115 | */ |
116 | - public function read(string $key): string|bool |
|
116 | + public function read(string $key): string | bool |
|
117 | 117 | { |
118 | 118 | return $this->getColumnValue($key, 'content'); |
119 | 119 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | /** |
133 | 133 | * {@inheritdoc} |
134 | 134 | */ |
135 | - public function write(string $key, mixed $content): int|bool |
|
135 | + public function write(string $key, mixed $content): int | bool |
|
136 | 136 | { |
137 | 137 | $values = [ |
138 | 138 | $this->getQuotedColumn('content') => $content, |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | return [ |
211 | 211 | 'dirs' => [], |
212 | 212 | 'keys' => array_map( |
213 | - function ($value) { |
|
213 | + function($value) { |
|
214 | 214 | return $value['_key']; |
215 | 215 | }, |
216 | 216 | $keys |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * {@inheritdoc} |
65 | 65 | */ |
66 | - public function read(string $key): string|bool |
|
66 | + public function read(string $key): string | bool |
|
67 | 67 | { |
68 | 68 | $this->ensureBucketExists(); |
69 | 69 | $options = $this->getOptions($key); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->ensureBucketExists(); |
93 | 93 | $options = $this->getOptions( |
94 | 94 | $targetKey, |
95 | - ['CopySource' => $this->bucket . '/' . $this->computePath($sourceKey)] |
|
95 | + ['CopySource' => $this->bucket.'/'.$this->computePath($sourceKey)] |
|
96 | 96 | ); |
97 | 97 | |
98 | 98 | try { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * {@inheritdoc} |
109 | 109 | */ |
110 | - public function write(string $key, mixed $content): int|bool |
|
110 | + public function write(string $key, mixed $content): int | bool |
|
111 | 111 | { |
112 | 112 | $this->ensureBucketExists(); |
113 | 113 | $options = $this->getOptions($key); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | /** |
146 | 146 | * {@inheritdoc} |
147 | 147 | */ |
148 | - public function mtime(string $key): int|bool |
|
148 | + public function mtime(string $key): int | bool |
|
149 | 149 | { |
150 | 150 | try { |
151 | 151 | $result = $this->service->headObject($this->getOptions($key)); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | { |
226 | 226 | $result = $this->service->listObjectsV2([ |
227 | 227 | 'Bucket' => $this->bucket, |
228 | - 'Prefix' => rtrim($this->computePath($key), '/') . '/', |
|
228 | + 'Prefix' => rtrim($this->computePath($key), '/').'/', |
|
229 | 229 | 'MaxKeys' => 1, |
230 | 230 | ]); |
231 | 231 | |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | return ltrim(substr($path, strlen($this->options['directory'])), '/'); |
305 | 305 | } |
306 | 306 | |
307 | - private function guessContentType(mixed $content): false|string |
|
307 | + private function guessContentType(mixed $content): false | string |
|
308 | 308 | { |
309 | 309 | $fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
310 | 310 |
@@ -115,7 +115,7 @@ |
||
115 | 115 | * @return int|false The number of bytes that were written into the file, or |
116 | 116 | * FALSE on failure |
117 | 117 | */ |
118 | - public function setContent(string $content, array $metadata = []): int|bool |
|
118 | + public function setContent(string $content, array $metadata = []): int | bool |
|
119 | 119 | { |
120 | 120 | $this->content = $content; |
121 | 121 | $this->setMetadata($metadata); |
@@ -15,14 +15,14 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @return string|bool if cannot read content |
17 | 17 | */ |
18 | - public function read(string $key): string|bool; |
|
18 | + public function read(string $key): string | bool; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Writes the given content into the file. |
22 | 22 | * |
23 | 23 | * @return int|bool The number of bytes that were written into the file |
24 | 24 | */ |
25 | - public function write(string $key, mixed $content): int|bool; |
|
25 | + public function write(string $key, mixed $content): int | bool; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Indicates whether the file exists. |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @return int|bool An UNIX like timestamp or false |
43 | 43 | */ |
44 | - public function mtime(string $key): int|bool; |
|
44 | + public function mtime(string $key): int | bool; |
|
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Deletes the file. |