Completed
Pull Request — master (#692)
by Pierre
14s
created
src/Gaufrette/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     /**
94 94
      * @return int|false Returns the file modified time.
95 95
      */
96
-    public function getMtime(): int|bool
96
+    public function getMtime(): int | bool
97 97
     {
98 98
         return $this->mtime = $this->filesystem->mtime($this->key);
99 99
     }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @return int|bool The number of bytes that were written into the file, or
110 110
      *             FALSE on failure
111 111
      */
112
-    public function setContent(string $content, array $metadata = []): int|bool
112
+    public function setContent(string $content, array $metadata = []): int | bool
113 113
     {
114 114
         $this->content = $content;
115 115
         $this->setMetadata($metadata);
Please login to merge, or discard this patch.
src/Gaufrette/Util/Path.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         $path = substr($path, strlen($prefix));
20 20
         $parts = array_filter(
21 21
             explode('/', $path),
22
-            function (string $part): bool {
22
+            function(string $part): bool {
23 23
                 return '' !== $part;
24 24
             },
25 25
         );
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             }
43 43
         }
44 44
 
45
-        return $prefix . implode('/', $tokens);
45
+        return $prefix.implode('/', $tokens);
46 46
     }
47 47
 
48 48
     /**
Please login to merge, or discard this patch.
src/Gaufrette/FilesystemInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      *
96 96
      * @throws \InvalidArgumentException If $key is invalid
97 97
      */
98
-    public function mtime(string $key): int|bool;
98
+    public function mtime(string $key): int | bool;
99 99
 
100 100
     /**
101 101
      * Returns the checksum of the specified file's content.
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      *
135 135
      * @throws \InvalidArgumentException If $key is invalid
136 136
      */
137
-    public function mimeType(string $key): string|bool;
137
+    public function mimeType(string $key): string | bool;
138 138
 
139 139
     public function isDirectory(string $key): bool;
140 140
 }
Please login to merge, or discard this patch.
src/Gaufrette/Filesystem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     /**
180 180
      * {@inheritdoc}
181 181
      */
182
-    public function mtime(string $key): int|bool
182
+    public function mtime(string $key): int | bool
183 183
     {
184 184
         self::assertValidKey($key);
185 185
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     /**
256 256
      * {@inheritdoc}
257 257
      */
258
-    public function mimeType(string $key): string|bool
258
+    public function mimeType(string $key): string | bool
259 259
     {
260 260
         self::assertValidKey($key);
261 261
 
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/SizeCalculator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,5 +12,5 @@
 block discarded – undo
12 12
     /**
13 13
      * @return false|int size of the specified key.
14 14
      */
15
-    public function size(string $key): bool|int;
15
+    public function size(string $key): bool | int;
16 16
 }
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/AwsS3.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * {@inheritdoc}
69 69
      */
70
-    public function read(string $key): string|bool
70
+    public function read(string $key): string | bool
71 71
     {
72 72
         $this->ensureBucketExists();
73 73
         $options = $this->getOptions($key);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $this->ensureBucketExists();
97 97
         $options = $this->getOptions(
98 98
             $targetKey,
99
-            ['CopySource' => $this->bucket . '/' . $this->computePath($sourceKey)]
99
+            ['CopySource' => $this->bucket.'/'.$this->computePath($sourceKey)]
100 100
         );
101 101
 
102 102
         try {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     /**
112 112
      * {@inheritdoc}
113 113
      */
114
-    public function write(string $key, mixed $content): int|bool
114
+    public function write(string $key, mixed $content): int | bool
115 115
     {
116 116
         $this->ensureBucketExists();
117 117
         $options = $this->getOptions($key, ['Body' => $content]);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     /**
149 149
      * {@inheritdoc}
150 150
      */
151
-    public function mtime(string $key): int|bool
151
+    public function mtime(string $key): int | bool
152 152
     {
153 153
         try {
154 154
             $result = $this->service->headObject($this->getOptions($key));
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     /**
163 163
      * {@inheritdoc}
164 164
      */
165
-    public function size(string $key): bool|int
165
+    public function size(string $key): bool | int
166 166
     {
167 167
         try {
168 168
             $result = $this->service->headObject($this->getOptions($key));
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         }
174 174
     }
175 175
 
176
-    public function mimeType(string $key): bool|string
176
+    public function mimeType(string $key): bool | string
177 177
     {
178 178
         try {
179 179
             $result = $this->service->headObject($this->getOptions($key));
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     {
237 237
         $result = $this->service->listObjects([
238 238
             'Bucket' => $this->bucket,
239
-            'Prefix' => rtrim($this->computePath($key), '/') . '/',
239
+            'Prefix' => rtrim($this->computePath($key), '/').'/',
240 240
             'MaxKeys' => 1,
241 241
         ]);
242 242
         if (isset($result['Contents'])) {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         return ltrim(substr($path, strlen($this->options['directory'])), '/');
316 316
     }
317 317
 
318
-    private function guessContentType(mixed $content): bool|string
318
+    private function guessContentType(mixed $content): bool | string
319 319
     {
320 320
         $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
321 321
 
Please login to merge, or discard this patch.