Passed
Pull Request — master (#407)
by Kirill
11:08 queued 03:58
created
src/storage/tests/Unit/Config/DTO/Traits/OptionsTraitTest.php 1 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 1 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 1 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.
src/storage/tests/Unit/Config/StorageConfigTest.php 1 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 1 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 1 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.
src/storage/tests/Unit/StorageEngineAbstractTest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@
 block discarded – undo
30 30
     ): Storage {
31 31
         $engine = new Storage($this->buildStorageConfig(), $this->getUriParser());
32 32
 
33
-        if (!empty($fs) && $fileSystem !== null) {
33
+        if (!empty($fs) && $fileSystem !== null)
34
+        {
34 35
             $this->mountStorageEngineFileSystem($engine, $fs, $fileSystem);
35 36
         }
36 37
 
Please login to merge, or discard this patch.
src/storage/tests/Traits/StorageConfigTrait.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@  discard block
 block discarded – undo
24 24
      */
25 25
     protected function buildStorageConfig(?array $servers = null, ?array $buckets = null): StorageConfig
26 26
     {
27
-        if (empty($servers)) {
27
+        if (empty($servers))
28
+        {
28 29
             $servers[self::SERVER_NAME] = [
29 30
                 LocalInfo::ADAPTER_KEY => LocalFilesystemAdapter::class,
30 31
                 LocalInfo::OPTIONS_KEY => [
@@ -34,9 +35,11 @@  discard block
 block discarded – undo
34 35
             ];
35 36
         }
36 37
 
37
-        if (!empty($servers) && empty($buckets)) {
38
+        if (!empty($servers) && empty($buckets))
39
+        {
38 40
             $buckets = [];
39
-            foreach ($servers as $server => $serverInfo) {
41
+            foreach ($servers as $server => $serverInfo)
42
+            {
40 43
                 $buckets[$this->buildBucketNameByServer($server)] = $this->buildServerBucketInfoDesc($server);
41 44
             }
42 45
         }
Please login to merge, or discard this patch.
src/storage/tests/TestCase.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@  discard block
 block discarded – undo
40 40
      */
41 41
     protected function getUriParser(): UriParserInterface
42 42
     {
43
-        if (!$this->uriParser instanceof UriParserInterface) {
43
+        if (!$this->uriParser instanceof UriParserInterface)
44
+        {
44 45
             $this->uriParser = new UriParser();
45 46
         }
46 47
 
@@ -52,7 +53,8 @@  discard block
 block discarded – undo
52 53
      */
53 54
     protected function notice(string $message): void
54 55
     {
55
-        if (\method_exists($this, 'addWarning')) {
56
+        if (\method_exists($this, 'addWarning'))
57
+        {
56 58
             /** @psalm-suppress InternalMethod */
57 59
             $this->addWarning($message);
58 60
         }
Please login to merge, or discard this patch.