Completed
Pull Request — master (#696)
by Pierre
37s
created
src/Gaufrette/Util/Path.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             }
42 42
         }
43 43
 
44
-        return $prefix . implode('/', $tokens);
44
+        return $prefix.implode('/', $tokens);
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Local.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/PhpseclibSftp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/GridFS.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Ftp.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
         $this->ensureDirectoryExists($this->directory, $this->create);
126 126
 
127 127
         $file = $this->computePath($key);
128
-        $lines = ftp_rawlist($this->getConnection(), '-al ' . \Gaufrette\Util\Path::dirname($file));
128
+        $lines = ftp_rawlist($this->getConnection(), '-al '.\Gaufrette\Util\Path::dirname($file));
129 129
 
130 130
         if (false === $lines) {
131 131
             return false;
132 132
         }
133 133
 
134
-        $pattern = '{(?<!->) ' . preg_quote(basename($file)) . '( -> |$)}m';
134
+        $pattern = '{(?<!->) '.preg_quote(basename($file)).'( -> |$)}m';
135 135
         foreach ($lines as $line) {
136 136
             if (preg_match($pattern, $line)) {
137 137
                 return true;
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $directory = preg_replace('/^[\/]*([^\/].*)$/', '/$1', $directory);
239 239
 
240 240
         $items = $this->parseRawlist(
241
-            ftp_rawlist($this->getConnection(), '-al ' . $this->directory . $directory) ?: []
241
+            ftp_rawlist($this->getConnection(), '-al '.$this->directory.$directory) ?: []
242 242
         );
243 243
 
244 244
         $fileData = $dirs = [];
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 
250 250
             $item = [
251 251
                 'name' => $itemData['name'],
252
-                'path' => trim(($directory ? $directory . '/' : '') . $itemData['name'], '/'),
252
+                'path' => trim(($directory ? $directory.'/' : '').$itemData['name'], '/'),
253 253
                 'time' => $itemData['time'],
254 254
                 'size' => $itemData['size'],
255 255
             ];
@@ -381,13 +381,13 @@  discard block
 block discarded – undo
381 381
     {
382 382
         $directory = preg_replace('/^[\/]*([^\/].*)$/', '/$1', $directory);
383 383
 
384
-        $lines = ftp_rawlist($this->getConnection(), '-alR ' . $this->directory . $directory);
384
+        $lines = ftp_rawlist($this->getConnection(), '-alR '.$this->directory.$directory);
385 385
 
386 386
         if (false === $lines) {
387 387
             return ['keys' => [], 'dirs' => []];
388 388
         }
389 389
 
390
-        $regexDir = '/' . preg_quote($this->directory . $directory, '/') . '\/?(.+):$/u';
390
+        $regexDir = '/'.preg_quote($this->directory.$directory, '/').'\/?(.+):$/u';
391 391
         $regexItem = '/^(?:([d\-\d])\S+)\s+\S+(?:(?:\s+\S+){5})?\s+(\S+)\s+(.+?)$/';
392 392
 
393 393
         $prevLine = null;
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
                     continue;
412 412
                 }
413 413
 
414
-                $path = ltrim($directory . '/' . $name, '/');
414
+                $path = ltrim($directory.'/'.$name, '/');
415 415
 
416 416
                 if ('d' === $tokens[1] || '<dir>' === $tokens[2]) {
417 417
                     $keys['dirs'][] = $path;
@@ -451,13 +451,13 @@  discard block
 block discarded – undo
451 451
             $infos = preg_split("/[\s]+/", $line, 9);
452 452
 
453 453
             if ($this->isLinuxListing($infos)) {
454
-                $infos[7] = (strrpos($infos[7], ':') != 2) ? ($infos[7] . ' 00:00') : (date('Y') . ' ' . $infos[7]);
454
+                $infos[7] = (strrpos($infos[7], ':') != 2) ? ($infos[7].' 00:00') : (date('Y').' '.$infos[7]);
455 455
                 if ('total' !== $infos[0]) {
456 456
                     $parsed[] = [
457 457
                         'perms' => $infos[0],
458 458
                         'num' => $infos[1],
459 459
                         'size' => $infos[4],
460
-                        'time' => strtotime($infos[5] . ' ' . $infos[6] . '. ' . $infos[7]),
460
+                        'time' => strtotime($infos[5].' '.$infos[6].'. '.$infos[7]),
461 461
                         'name' => $infos[8],
462 462
                     ];
463 463
                 }
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
                     'perms' => $isDir ? 'd' : '-',
468 468
                     'num' => '',
469 469
                     'size' => $isDir ? '' : $infos[2],
470
-                    'time' => strtotime($infos[0] . ' ' . $infos[1]),
470
+                    'time' => strtotime($infos[0].' '.$infos[1]),
471 471
                     'name' => $infos[3],
472 472
                 ];
473 473
             }
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
      */
484 484
     private function computePath($key)
485 485
     {
486
-        return rtrim($this->directory, '/') . '/' . $key;
486
+        return rtrim($this->directory, '/').'/'.$key;
487 487
     }
488 488
 
489 489
     /**
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -264,8 +264,8 @@
 block discarded – undo
264 264
         $this->fileData = array_merge($fileData, $this->fileData);
265 265
 
266 266
         return [
267
-           'keys' => array_keys($fileData),
268
-           'dirs' => $dirs,
267
+            'keys' => array_keys($fileData),
268
+            'dirs' => $dirs,
269 269
         ];
270 270
     }
271 271
 
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/GoogleCloudStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
270 270
      */
271 271
     public function isDirectory($key)
272 272
     {
273
-        if ($this->exists($key . '/')) {
273
+        if ($this->exists($key.'/')) {
274 274
             return true;
275 275
         }
276 276
 
Please login to merge, or discard this patch.
src/Gaufrette/Stream/InMemoryBuffer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
         } else {
90 90
             $before = substr($this->content, 0, $this->position);
91 91
             $after = $newNumBytes > $newPosition ? substr($this->content, $newPosition) : '';
92
-            $this->content = $before . $data . $after;
92
+            $this->content = $before.$data.$after;
93 93
         }
94 94
 
95 95
         $this->position = $newPosition;
Please login to merge, or discard this patch.
src/Gaufrette/StreamWrapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -257,11 +257,11 @@
 block discarded – undo
257 257
         $key = !empty($parts['path']) ? substr($parts['path'], 1) : '';
258 258
 
259 259
         if (null !== $parts['query']) {
260
-            $key .= '?' . $parts['query'];
260
+            $key .= '?'.$parts['query'];
261 261
         }
262 262
 
263 263
         if (null !== $parts['fragment']) {
264
-            $key .= '#' . $parts['fragment'];
264
+            $key .= '#'.$parts['fragment'];
265 265
         }
266 266
 
267 267
         if (empty($domain) || empty($key)) {
Please login to merge, or discard this patch.
src/Gaufrette/Adapter/Flysystem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.