Completed
Pull Request — master (#27)
by Bernardo Vieira da
03:37 queued 01:41
created
src/Command/FindCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $adapterName = $input->getArgument('adapter');
34 34
         if (!in_array($adapterName, $this->availableAdapters)) {
35
-            $output->writeln('Invalid adapter name supplied! Adapters available: ' . implode(', ', $this->availableAdapters));
35
+            $output->writeln('Invalid adapter name supplied! Adapters available: '.implode(', ', $this->availableAdapters));
36 36
 
37 37
             return;
38 38
         }
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
         $filename = $input->getArgument('filename');
44 44
 
45 45
         if ($fileSystem->exists($filename)) {
46
-            $output->writeln('File was found using adapter (' . $adapterName . ')');
46
+            $output->writeln('File was found using adapter ('.$adapterName.')');
47 47
         } else {
48
-            $output->writeln('File not found using adapter (' . $adapterName . ')');
48
+            $output->writeln('File not found using adapter ('.$adapterName.')');
49 49
         }
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Utility/PathHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $withoutExtensionAndWithoutQueryString = implode('.', $pathParts);
39 39
 
40 40
         if (count($extensionAndQueryStringParts) === 2) {
41
-            return $withoutExtensionAndWithoutQueryString . '?' . $extensionAndQueryStringParts[1];
41
+            return $withoutExtensionAndWithoutQueryString.'?'.$extensionAndQueryStringParts[1];
42 42
         } else {
43 43
             return $withoutExtensionAndWithoutQueryString;
44 44
         }
Please login to merge, or discard this patch.
src/Tests/Unit/ServerFileSystem/ServerFileSystemTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function testGetFilesInDirectoryIsRecursiveAndAlphabetical()
17 17
     {
18
-        $files = ServerFileSystem::getFilesInDirectory(__DIR__  . '/../');
18
+        $files = ServerFileSystem::getFilesInDirectory(__DIR__.'/../');
19 19
 
20 20
         $this->assertCount(6, $files);
21 21
         $this->assertStringEndsWith('Unit/Adapter/LocalStorageTest.php', $files[0]);
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function testDeleteFilesInDirectoryRecursively()
26 26
     {
27
-        $dir = __DIR__ . '/deleteFilesInDirectoryRecursively/';
27
+        $dir = __DIR__.'/deleteFilesInDirectoryRecursively/';
28 28
 
29 29
         if (!is_dir($dir)) {
30 30
             mkdir($dir);
31 31
         }
32
-        file_put_contents($dir . '1.txt', '1');
33
-        file_put_contents($dir . '2.txt', '2');
34
-        mkdir($dir . 'subdir');
35
-        file_put_contents($dir . 'subdir/3.txt', '3');
36
-        file_put_contents($dir . 'subdir/4.txt', '4');
32
+        file_put_contents($dir.'1.txt', '1');
33
+        file_put_contents($dir.'2.txt', '2');
34
+        mkdir($dir.'subdir');
35
+        file_put_contents($dir.'subdir/3.txt', '3');
36
+        file_put_contents($dir.'subdir/4.txt', '4');
37 37
 
38 38
         $filesBefore = ServerFileSystem::getFilesInDirectory($dir);
39 39
         $this->assertCount(4, $filesBefore);
Please login to merge, or discard this patch.
src/Adapter/AmazonS3.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
         /*
170 170
          * Add '/' character to the directories if necessary
171 171
          */
172
-        $sourceDir = $sourceDir . (substr($sourceDir, -1) == '/' ? '' : '/');
173
-        $targetDir = $targetDir . (substr($targetDir, -1) == '/' ? '' : '/');
172
+        $sourceDir = $sourceDir.(substr($sourceDir, -1) == '/' ? '' : '/');
173
+        $targetDir = $targetDir.(substr($targetDir, -1) == '/' ? '' : '/');
174 174
 
175 175
         $this->ensureBucketExists();
176 176
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $batch = array();
180 180
         for ($i = 0; $i < count($files); $i++) {
181 181
             $targetFile = str_replace($sourceDir, "", $files[$i]);
182
-            $batch[] =  $this->service->getCommand('CopyObject', array(
182
+            $batch[] = $this->service->getCommand('CopyObject', array(
183 183
                 'Bucket'     => $targetBucket,
184 184
                 'Key'        => "{$targetDir}{$targetFile}",
185 185
                 'CopySource' => "{$sourceBucket}/{$files[$i]}",
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     {
302 302
         $content = $this->read($path);
303 303
         $extension = pathinfo($path, PATHINFO_EXTENSION);
304
-        $target = tempnam($this->localTmpDir, null) . '.' . $extension;
304
+        $target = tempnam($this->localTmpDir, null).'.'.$extension;
305 305
 
306 306
         file_put_contents($target, $content);
307 307
 
Please login to merge, or discard this patch.
src/Adapter/LocalStorage.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $this->service = $service;
32 32
 
33
-        $absolutePathNormalised = '/' . trim($parameters['path'], '/');
33
+        $absolutePathNormalised = '/'.trim($parameters['path'], '/');
34 34
         if (is_dir($absolutePathNormalised) && realpath($absolutePathNormalised)) {
35 35
             $this->absolutePath = realpath($absolutePathNormalised);
36 36
         } else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $fullPath = $path;
54 54
         } else {
55 55
             $path = $this->pathOrUrlToPath($path);
56
-            $fullPath = $this->absolutePath . '/' . $path;
56
+            $fullPath = $this->absolutePath.'/'.$path;
57 57
         }
58 58
 
59 59
         return (string) file_get_contents($fullPath);
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
     {
114 114
         $directory = $this->pathOrUrlToPath($directory);
115 115
 
116
-        $files = ServerFileSystem::getFilesInDirectory($this->absolutePath . '/' . $directory);
116
+        $files = ServerFileSystem::getFilesInDirectory($this->absolutePath.'/'.$directory);
117 117
 
118
-        return array_map(function ($file) {
119
-            return str_replace($this->absolutePath . '/', '', $file);
118
+        return array_map(function($file) {
119
+            return str_replace($this->absolutePath.'/', '', $file);
120 120
         }, $files);
121 121
     }
122 122
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function getFileSize($path)
205 205
     {
206
-        $fullPath = $this->absolutePath . '/' . $this->pathOrUrlToPath($path);
206
+        $fullPath = $this->absolutePath.'/'.$this->pathOrUrlToPath($path);
207 207
 
208 208
         return filesize($fullPath);
209 209
     }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     {
216 216
         $content = $this->read($path);
217 217
         $extension = pathinfo($path, PATHINFO_EXTENSION);
218
-        $target = tempnam($this->localTmpDir, null) . '.' . $extension;
218
+        $target = tempnam($this->localTmpDir, null).'.'.$extension;
219 219
 
220 220
         file_put_contents($target, $content);
221 221
 
Please login to merge, or discard this patch.