Passed
Pull Request — master (#407)
by Kirill
06:33
created
src/storage/tests/Feature/StorageEngineForLocalTestCase.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             $this->getUriParser()
56 56
         );
57 57
 
58
-        $tmpFilePath = $engine->tempFilename('localBucket://' . static::ROOT_FILE_NAME);
58
+        $tmpFilePath = $engine->tempFilename('localBucket://'.static::ROOT_FILE_NAME);
59 59
 
60 60
         $this->assertMatchesRegularExpression(
61 61
             \sprintf('/^\/tmp\/%s_[\w]*$/', static::ROOT_FILE_NAME),
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $storageEngine = $this->buildStorageForFs('local');
76 76
 
77 77
         $this->assertTrue(
78
-            $storageEngine->fileExists('localBucket://' . self::ROOT_FILE_NAME)
78
+            $storageEngine->fileExists('localBucket://'.self::ROOT_FILE_NAME)
79 79
         );
80 80
 
81 81
         $this->assertFalse(
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $this->expectException(StorageException::class);
94 94
         $this->expectExceptionMessage('Filesystem `other` was not identified');
95 95
 
96
-        $this->buildStorageForFs('local')->fileExists('other://' . static::ROOT_FILE_NAME);
96
+        $this->buildStorageForFs('local')->fileExists('other://'.static::ROOT_FILE_NAME);
97 97
     }
98 98
 
99 99
     /**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
         $this->assertEquals(
124 124
             static::ROOT_FILE_CONTENT,
125
-            $storageEngine->read('localBucket://' . static::ROOT_FILE_NAME)
125
+            $storageEngine->read('localBucket://'.static::ROOT_FILE_NAME)
126 126
         );
127 127
     }
128 128
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
         $storageEngine = $this->buildStorageForFs('local');
152 152
 
153
-        $this->assertIsResource($storageEngine->readStream('localBucket://' . static::ROOT_FILE_NAME));
153
+        $this->assertIsResource($storageEngine->readStream('localBucket://'.static::ROOT_FILE_NAME));
154 154
     }
155 155
 
156 156
     /**
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
         $storageEngine = $this->buildStorageForFs('local');
181 181
 
182
-        $fileLastModified = $storageEngine->lastModified('localBucket://' . static::ROOT_FILE_NAME);
182
+        $fileLastModified = $storageEngine->lastModified('localBucket://'.static::ROOT_FILE_NAME);
183 183
         $dateLastModified = $today->setTimestamp($fileLastModified);
184 184
 
185 185
         $this->assertIsInt($fileLastModified);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
         $storageEngine = $this->buildStorageForFs('local');
216 216
 
217
-        $fileSize = $storageEngine->fileSize('localBucket://' . static::ROOT_FILE_NAME);
217
+        $fileSize = $storageEngine->fileSize('localBucket://'.static::ROOT_FILE_NAME);
218 218
 
219 219
         $this->assertIsInt($fileSize);
220 220
         $this->assertNotEmpty($fileSize);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
         $storageEngine = $this->buildStorageForFs('local');
248 248
 
249
-        $this->assertEquals('text/plain', $storageEngine->mimeType('localBucket://' . static::ROOT_FILE_NAME));
249
+        $this->assertEquals('text/plain', $storageEngine->mimeType('localBucket://'.static::ROOT_FILE_NAME));
250 250
     }
251 251
 
252 252
     /**
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 
276 276
         $storageEngine = $this->buildStorageForFs('local');
277 277
 
278
-        $this->assertEquals('public', $storageEngine->visibility('localBucket://' . static::ROOT_FILE_NAME));
278
+        $this->assertEquals('public', $storageEngine->visibility('localBucket://'.static::ROOT_FILE_NAME));
279 279
     }
280 280
 
281 281
     /**
Please login to merge, or discard this patch.
src/storage/tests/Unit/Config/DTO/Traits/ClassBasedTraitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     public function testSetClassFailed(): void
34 34
     {
35
-        $wrongClass = static::class . 1;
35
+        $wrongClass = static::class.1;
36 36
 
37 37
         $this->expectException(StorageException::class);
38 38
         $this->expectExceptionMessage(
Please login to merge, or discard this patch.
src/storage/tests/Unit/Config/DTO/Traits/OptionsTraitTest.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $trait = $this->buildBasicOptions();
27 27
 
28
-        foreach (self::BASIC_OPTIONS as $option => $optionVal) {
28
+        foreach (self::BASIC_OPTIONS as $option => $optionVal){
29 29
             $this->assertTrue($trait->hasOption($option));
30 30
         }
31 31
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $trait = $this->buildBasicOptions();
41 41
 
42
-        foreach (self::BASIC_OPTIONS as $option => $optionVal) {
42
+        foreach (self::BASIC_OPTIONS as $option => $optionVal){
43 43
             $this->assertEquals($optionVal, $trait->getOption($option));
44 44
         }
45 45
 
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
             ['arrayOption', true, OptionsBasedInterface::ARRAY_TYPE, false],
164 164
         ];
165 165
 
166
-        foreach ([0, 1, 3, '4', '15'] as $key => $intVal) {
167
-            $result[] = ['intOption' . $key, $intVal, OptionsBasedInterface::INT_TYPE, true];
166
+        foreach ([0, 1, 3, '4', '15'] as $key => $intVal){
167
+            $result[] = ['intOption'.$key, $intVal, OptionsBasedInterface::INT_TYPE, true];
168 168
         }
169 169
 
170
-        foreach ([0, 1, '0', '1', true, false] as $key => $boolVal) {
171
-            $result[] = ['boolOption' . $key, $boolVal, OptionsBasedInterface::BOOL_TYPE, true];
170
+        foreach ([0, 1, '0', '1', true, false] as $key => $boolVal){
171
+            $result[] = ['boolOption'.$key, $boolVal, OptionsBasedInterface::BOOL_TYPE, true];
172 172
         }
173 173
 
174 174
         $mixedVals = [
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
             [3, 4],
184 184
         ];
185 185
 
186
-        foreach ($mixedVals as $key => $mixedVal) {
187
-            $result[] = ['mixedOption' . $key, $mixedVal, OptionsBasedInterface::MIXED_TYPE, true];
186
+        foreach ($mixedVals as $key => $mixedVal){
187
+            $result[] = ['mixedOption'.$key, $mixedVal, OptionsBasedInterface::MIXED_TYPE, true];
188 188
         }
189 189
 
190 190
         return $result;
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $trait = $this->buildBasicOptions();
27 27
 
28
-        foreach (self::BASIC_OPTIONS as $option => $optionVal) {
28
+        foreach (self::BASIC_OPTIONS as $option => $optionVal)
29
+        {
29 30
             $this->assertTrue($trait->hasOption($option));
30 31
         }
31 32
 
@@ -39,7 +40,8 @@  discard block
 block discarded – undo
39 40
     {
40 41
         $trait = $this->buildBasicOptions();
41 42
 
42
-        foreach (self::BASIC_OPTIONS as $option => $optionVal) {
43
+        foreach (self::BASIC_OPTIONS as $option => $optionVal)
44
+        {
43 45
             $this->assertEquals($optionVal, $trait->getOption($option));
44 46
         }
45 47
 
@@ -163,11 +165,13 @@  discard block
 block discarded – undo
163 165
             ['arrayOption', true, OptionsBasedInterface::ARRAY_TYPE, false],
164 166
         ];
165 167
 
166
-        foreach ([0, 1, 3, '4', '15'] as $key => $intVal) {
168
+        foreach ([0, 1, 3, '4', '15'] as $key => $intVal)
169
+        {
167 170
             $result[] = ['intOption' . $key, $intVal, OptionsBasedInterface::INT_TYPE, true];
168 171
         }
169 172
 
170
-        foreach ([0, 1, '0', '1', true, false] as $key => $boolVal) {
173
+        foreach ([0, 1, '0', '1', true, false] as $key => $boolVal)
174
+        {
171 175
             $result[] = ['boolOption' . $key, $boolVal, OptionsBasedInterface::BOOL_TYPE, true];
172 176
         }
173 177
 
@@ -183,7 +187,8 @@  discard block
 block discarded – undo
183 187
             [3, 4],
184 188
         ];
185 189
 
186
-        foreach ($mixedVals as $key => $mixedVal) {
190
+        foreach ($mixedVals as $key => $mixedVal)
191
+        {
187 192
             $result[] = ['mixedOption' . $key, $mixedVal, OptionsBasedInterface::MIXED_TYPE, true];
188 193
         }
189 194
 
Please login to merge, or discard this patch.
src/storage/tests/Unit/Config/DTO/FileSystemInfo/LocalInfoTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@
 block discarded – undo
43 43
         $this->assertEquals(LocalSystemResolver::class, $fsInfo->getResolverClass());
44 44
         $this->assertEquals($fsName, $fsInfo->getName());
45 45
 
46
-        foreach ($options as $optionKey => $optionVal) {
47
-            if ($optionKey === $missedOption) {
46
+        foreach ($options as $optionKey => $optionVal){
47
+            if ($optionKey === $missedOption){
48 48
                 $this->assertNull($fsInfo->getOption($optionKey));
49 49
                 continue;
50 50
             }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,10 @@
 block discarded – undo
43 43
         $this->assertEquals(LocalSystemResolver::class, $fsInfo->getResolverClass());
44 44
         $this->assertEquals($fsName, $fsInfo->getName());
45 45
 
46
-        foreach ($options as $optionKey => $optionVal) {
47
-            if ($optionKey === $missedOption) {
46
+        foreach ($options as $optionKey => $optionVal)
47
+        {
48
+            if ($optionKey === $missedOption)
49
+            {
48 50
                 $this->assertNull($fsInfo->getOption($optionKey));
49 51
                 continue;
50 52
             }
Please login to merge, or discard this patch.
src/storage/tests/Unit/Config/DTO/FileSystemInfo/Aws/AwsS3InfoTest.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $this->assertEquals(AwsS3V3Adapter::class, $fsInfo->getAdapterClass());
40 40
 
41
-        foreach ($options as $optionKey => $optionVal) {
41
+        foreach ($options as $optionKey => $optionVal){
42 42
             $this->assertEquals($optionVal, $fsInfo->getOption($optionKey));
43 43
         }
44 44
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         $this->assertEquals(AsyncAwsS3Adapter::class, $fsInfo->getAdapterClass());
67 67
 
68
-        foreach ($options as $optionKey => $optionVal) {
68
+        foreach ($options as $optionKey => $optionVal){
69 69
             $this->assertEquals($optionVal, $fsInfo->getOption($optionKey));
70 70
         }
71 71
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         );
92 92
 
93 93
         $this->assertTrue($fsInfo->isAdvancedUsage());
94
-        foreach ($options as $optionKey => $optionVal) {
94
+        foreach ($options as $optionKey => $optionVal){
95 95
             $this->assertEquals($optionVal, $fsInfo->getOption($optionKey));
96 96
         }
97 97
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         );
122 122
 
123 123
         $this->assertTrue($advancedAwsS3Info->isAdvancedUsage());
124
-        foreach ($options as $optionKey => $optionVal) {
124
+        foreach ($options as $optionKey => $optionVal){
125 125
             $this->assertEquals($optionVal, $advancedAwsS3Info->getOption($optionKey));
126 126
         }
127 127
 
@@ -290,17 +290,17 @@  discard block
 block discarded – undo
290 290
             [
291 291
                 $fsName,
292 292
                 [new \DateTime('+1 hour')],
293
-                $errorMsgPrefix . self::SERVER_NAME,
293
+                $errorMsgPrefix.self::SERVER_NAME,
294 294
             ],
295 295
             [
296 296
                 $fsName,
297 297
                 null,
298
-                $errorMsgPrefix . self::SERVER_NAME,
298
+                $errorMsgPrefix.self::SERVER_NAME,
299 299
             ],
300 300
             [
301 301
                 'some',
302 302
                 true,
303
-                $errorMsgPrefix . 'some',
303
+                $errorMsgPrefix.'some',
304 304
             ],
305 305
         ];
306 306
     }
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@  discard block
 block discarded – undo
38 38
 
39 39
         $this->assertEquals(AwsS3V3Adapter::class, $fsInfo->getAdapterClass());
40 40
 
41
-        foreach ($options as $optionKey => $optionVal) {
41
+        foreach ($options as $optionKey => $optionVal)
42
+        {
42 43
             $this->assertEquals($optionVal, $fsInfo->getOption($optionKey));
43 44
         }
44 45
 
@@ -65,7 +66,8 @@  discard block
 block discarded – undo
65 66
 
66 67
         $this->assertEquals(AsyncAwsS3Adapter::class, $fsInfo->getAdapterClass());
67 68
 
68
-        foreach ($options as $optionKey => $optionVal) {
69
+        foreach ($options as $optionKey => $optionVal)
70
+        {
69 71
             $this->assertEquals($optionVal, $fsInfo->getOption($optionKey));
70 72
         }
71 73
     }
@@ -91,7 +93,8 @@  discard block
 block discarded – undo
91 93
         );
92 94
 
93 95
         $this->assertTrue($fsInfo->isAdvancedUsage());
94
-        foreach ($options as $optionKey => $optionVal) {
96
+        foreach ($options as $optionKey => $optionVal)
97
+        {
95 98
             $this->assertEquals($optionVal, $fsInfo->getOption($optionKey));
96 99
         }
97 100
 
@@ -121,7 +124,8 @@  discard block
 block discarded – undo
121 124
         );
122 125
 
123 126
         $this->assertTrue($advancedAwsS3Info->isAdvancedUsage());
124
-        foreach ($options as $optionKey => $optionVal) {
127
+        foreach ($options as $optionKey => $optionVal)
128
+        {
125 129
             $this->assertEquals($optionVal, $advancedAwsS3Info->getOption($optionKey));
126 130
         }
127 131
 
Please login to merge, or discard this patch.
tests/Unit/Config/DTO/FileSystemInfo/Aws/AwsVisibilityConverterTest.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
             [
23 23
                 AwsVisibilityConverter::CLASS_KEY => PortableVisibilityConverter::class,
24 24
                 AwsVisibilityConverter::OPTIONS_KEY => [
25
-                    AwsVisibilityConverter::VISIBILITY_KEY => Visibility::PUBLIC,
25
+                    AwsVisibilityConverter::VISIBILITY_KEY => Visibility::public,
26 26
                 ]
27 27
             ]
28 28
         );
29 29
 
30 30
         $this->assertEquals(PortableVisibilityConverter::class, $info->getClass());
31
-        $this->assertEquals(Visibility::PUBLIC, $info->getOption(AwsVisibilityConverter::VISIBILITY_KEY));
31
+        $this->assertEquals(Visibility::public, $info->getOption(AwsVisibilityConverter::VISIBILITY_KEY));
32 32
     }
33 33
 
34 34
     /**
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             [
41 41
                 AwsVisibilityConverter::CLASS_KEY => PortableVisibilityConverter::class,
42 42
                 AwsVisibilityConverter::OPTIONS_KEY => [
43
-                    AwsVisibilityConverter::VISIBILITY_KEY => Visibility::PUBLIC,
43
+                    AwsVisibilityConverter::VISIBILITY_KEY => Visibility::public,
44 44
                 ],
45 45
             ]
46 46
         );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         new AwsVisibilityConverter(
63 63
             [
64 64
                 AwsVisibilityConverter::OPTIONS_KEY => [
65
-                    AwsVisibilityConverter::VISIBILITY_KEY => Visibility::PUBLIC,
65
+                    AwsVisibilityConverter::VISIBILITY_KEY => Visibility::public,
66 66
                 ],
67 67
             ]
68 68
         );
Please login to merge, or discard this patch.
src/storage/tests/Unit/Config/StorageConfigTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $this->assertInstanceOf($class, $fs);
88 88
 
89
-        foreach ($serverDescription[FileSystemInfo\OptionsBasedInterface::OPTIONS_KEY] as $optionKey => $optionVal) {
89
+        foreach ($serverDescription[FileSystemInfo\OptionsBasedInterface::OPTIONS_KEY] as $optionKey => $optionVal){
90 90
             $this->assertEquals($optionVal, $fs->getOption($optionKey));
91 91
         }
92 92
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     {
181 181
         $this->expectException(ConfigException::class);
182 182
         $this->expectExceptionMessage(
183
-            'Storage server `another` adapter must be a class string that ' .
183
+            'Storage server `another` adapter must be a class string that '.
184 184
             'implements League\Flysystem\FilesystemAdapter interface, but string(DateTime) defined'
185 185
         );
186 186
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,8 @@
 block discarded – undo
86 86
 
87 87
         $this->assertInstanceOf($class, $fs);
88 88
 
89
-        foreach ($serverDescription[FileSystemInfo\OptionsBasedInterface::OPTIONS_KEY] as $optionKey => $optionVal) {
89
+        foreach ($serverDescription[FileSystemInfo\OptionsBasedInterface::OPTIONS_KEY] as $optionKey => $optionVal)
90
+        {
90 91
             $this->assertEquals($optionVal, $fs->getOption($optionKey));
91 92
         }
92 93
     }
Please login to merge, or discard this patch.
src/storage/tests/Unit/Resolver/LocalSystemResolverTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
             'File-part+2_.png',
184 184
         ];
185 185
 
186
-        foreach ($filesList as $fileName) {
186
+        foreach ($filesList as $fileName){
187 187
             $result[] = [
188 188
                 \sprintf('%s://%s', $bucketName, $fileName),
189 189
                 $fileName,
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,8 @@
 block discarded – undo
183 183
             'File-part+2_.png',
184 184
         ];
185 185
 
186
-        foreach ($filesList as $fileName) {
186
+        foreach ($filesList as $fileName)
187
+        {
187 188
             $result[] = [
188 189
                 \sprintf('%s://%s', $bucketName, $fileName),
189 190
                 $fileName,
Please login to merge, or discard this patch.
src/storage/tests/Unit/StorageEngineTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
         $storage = new Storage($storageConfig, $this->getUriParser());
81 81
 
82
-        foreach ($fsList as $key) {
82
+        foreach ($fsList as $key){
83 83
             $this->assertInstanceOf(FilesystemOperator::class, $storage->getFileSystem($key));
84 84
         }
85 85
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         $storage = new Storage($storageConfig, $this->getUriParser());
107 107
 
108
-        foreach ($fsList as $key) {
108
+        foreach ($fsList as $key){
109 109
             $this->assertInstanceOf(FilesystemOperator::class, $storage->getFileSystem($key));
110 110
         }
111 111
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,8 @@  discard block
 block discarded – undo
79 79
 
80 80
         $storage = new Storage($storageConfig, $this->getUriParser());
81 81
 
82
-        foreach ($fsList as $key) {
82
+        foreach ($fsList as $key)
83
+        {
83 84
             $this->assertInstanceOf(FilesystemOperator::class, $storage->getFileSystem($key));
84 85
         }
85 86
 
@@ -105,7 +106,8 @@  discard block
 block discarded – undo
105 106
 
106 107
         $storage = new Storage($storageConfig, $this->getUriParser());
107 108
 
108
-        foreach ($fsList as $key) {
109
+        foreach ($fsList as $key)
110
+        {
109 111
             $this->assertInstanceOf(FilesystemOperator::class, $storage->getFileSystem($key));
110 112
         }
111 113
 
Please login to merge, or discard this patch.