@@ -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. |