Passed
Pull Request — master (#1186)
by Abdul Malik
10:33
created
src/Core/tests/ExceptionsTest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $container = new Container();
137 137
 
138
-        try {
138
+        try{
139 139
             $container->get('invalid');
140
-        } catch (ContainerException $e) {
140
+        }catch (ContainerException $e){
141 141
             $this->assertSame(
142 142
                 <<<MARKDOWN
143 143
                 Can't resolve `invalid`: undefined class or binding `invalid`.
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
     {
170 170
         $this->expectException(ContainerException::class);
171 171
 
172
-        try {
172
+        try{
173 173
             $container->get(ClassWithUndefinedDependency::class);
174
-        } catch (ContainerException $e) {
174
+        }catch (ContainerException $e){
175 175
             $this->assertSame($message, $e->getMessage());
176 176
 
177 177
             throw $e;
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,9 +135,12 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $container = new Container();
137 137
 
138
-        try {
138
+        try
139
+        {
139 140
             $container->get('invalid');
140
-        } catch (ContainerException $e) {
141
+        }
142
+        catch (ContainerException $e)
143
+        {
141 144
             $this->assertSame(
142 145
                 <<<MARKDOWN
143 146
                 Can't resolve `invalid`: undefined class or binding `invalid`.
@@ -169,9 +172,12 @@  discard block
 block discarded – undo
169 172
     {
170 173
         $this->expectException(ContainerException::class);
171 174
 
172
-        try {
175
+        try
176
+        {
173 177
             $container->get(ClassWithUndefinedDependency::class);
174
-        } catch (ContainerException $e) {
178
+        }
179
+        catch (ContainerException $e)
180
+        {
175 181
             $this->assertSame($message, $e->getMessage());
176 182
 
177 183
             throw $e;
Please login to merge, or discard this patch.
src/Core/tests/Scope/ScopeAttributeTest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         $root = self::makeContainer();
167 167
 
168
-        try {
168
+        try{
169 169
             $root->runScoped(static function (Container $c1): void {
170 170
                 $c1->runScoped(static function (Container $c2): void {
171 171
                     $c2->runScoped(static function (Container $c3): void {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     }, name: 'root');
174 174
                 });
175 175
             });
176
-        } catch (NamedScopeDuplicationException $e) {
176
+        }catch (NamedScopeDuplicationException $e){
177 177
             $this->assertSame('root', $e->getScope());
178 178
             throw $e;
179 179
         }
@@ -188,14 +188,14 @@  discard block
 block discarded – undo
188 188
     {
189 189
         self::expectException(BadScopeException::class);
190 190
 
191
-        try {
191
+        try{
192 192
             $root = self::makeContainer();
193 193
             $root->runScoped(static function (Container $c1): void {
194 194
                 $c1->runScoped(static function (Container $c2): void {
195 195
                     $c2->get(AttrScopeFoo::class);
196 196
                 });
197 197
             }, name: 'bar');
198
-        } catch (BadScopeException $e) {
198
+        }catch (BadScopeException $e){
199 199
             $this->assertSame('foo', $e->getScope());
200 200
             throw $e;
201 201
         }
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -165,7 +165,8 @@  discard block
 block discarded – undo
165 165
 
166 166
         $root = self::makeContainer();
167 167
 
168
-        try {
168
+        try
169
+        {
169 170
             $root->runScoped(static function (Container $c1): void {
170 171
                 $c1->runScoped(static function (Container $c2): void {
171 172
                     $c2->runScoped(static function (Container $c3): void {
@@ -173,7 +174,9 @@  discard block
 block discarded – undo
173 174
                     }, name: 'root');
174 175
                 });
175 176
             });
176
-        } catch (NamedScopeDuplicationException $e) {
177
+        }
178
+        catch (NamedScopeDuplicationException $e)
179
+        {
177 180
             $this->assertSame('root', $e->getScope());
178 181
             throw $e;
179 182
         }
@@ -188,14 +191,17 @@  discard block
 block discarded – undo
188 191
     {
189 192
         self::expectException(BadScopeException::class);
190 193
 
191
-        try {
194
+        try
195
+        {
192 196
             $root = self::makeContainer();
193 197
             $root->runScoped(static function (Container $c1): void {
194 198
                 $c1->runScoped(static function (Container $c2): void {
195 199
                     $c2->get(AttrScopeFoo::class);
196 200
                 });
197 201
             }, name: 'bar');
198
-        } catch (BadScopeException $e) {
202
+        }
203
+        catch (BadScopeException $e)
204
+        {
199 205
             $this->assertSame('foo', $e->getScope());
200 206
             throw $e;
201 207
         }
Please login to merge, or discard this patch.
src/Core/tests/Scope/FibersTest.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         );
64 64
 
65 65
         $this->assertCount(5, $result);
66
-        foreach ($result as $suspendValue) {
66
+        foreach ($result as $suspendValue){
67 67
             $this->assertSame(self::TEST_DATA, $suspendValue);
68 68
         }
69 69
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         );
82 82
 
83 83
         $this->assertCount(2, $result);
84
-        foreach ($result as $suspendValue) {
84
+        foreach ($result as $suspendValue){
85 85
             $this->assertSame(self::TEST_DATA, $suspendValue);
86 86
         }
87 87
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                     $result = '';
98 98
                     $result .= Fiber::suspend('foo');
99 99
                     $result .= Fiber::suspend('bar');
100
-                    return $result . Fiber::suspend('error');
100
+                    return $result.Fiber::suspend('error');
101 101
                 }
102 102
             ),
103 103
             static fn(string $suspendValue): string => $suspendValue !== 'error'
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
                     $result = '';
115 115
                     $result .= Fiber::suspend('foo');
116 116
                     $result .= Fiber::suspend('bar');
117
-                    try {
117
+                    try{
118 118
                         $result .= Fiber::suspend('error');
119
-                    } catch (\Throwable $e) {
119
+                    }catch (\Throwable $e){
120 120
                         $result .= $e->getMessage();
121 121
                     }
122
-                    return $result . Fiber::suspend('baz');
122
+                    return $result.Fiber::suspend('baz');
123 123
                 }
124 124
             ),
125 125
             static fn(string $suspendValue): string => $suspendValue !== 'error'
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         ?callable $load = null,
143 143
         ?Container $container = null,
144 144
     ): callable {
145
-        return static function () use ($load, $container): array {
145
+        return static function () use ($load, $container) : array {
146 146
             // The function should be called in a fiber
147 147
             self::assertNotNull(Fiber::getCurrent());
148 148
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                         $resource = $c3->get('resource');
164 164
                         self::assertInstanceOf(DateTimeImmutable::class, $c3->get('bar'));
165 165
                         self::assertInstanceOf(stdClass::class, $resource);
166
-                        foreach (self::TEST_DATA as $key => $value) {
166
+                        foreach (self::TEST_DATA as $key => $value){
167 167
                             $resource->$key = $value;
168 168
                             $load === null or $load();
169 169
                             Fiber::suspend($value);
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
             }, ['foo' => new DateTime()]);
177 177
             self::assertFalse($c1->has('foo'));
178 178
 
179
-            self::assertSame(self::TEST_DATA, (array) $result);
180
-            return (array) $result;
179
+            self::assertSame(self::TEST_DATA, (array)$result);
180
+            return (array)$result;
181 181
         };
182 182
     }
183 183
 }
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,8 @@  discard block
 block discarded – undo
63 63
         );
64 64
 
65 65
         $this->assertCount(5, $result);
66
-        foreach ($result as $suspendValue) {
66
+        foreach ($result as $suspendValue)
67
+        {
67 68
             $this->assertSame(self::TEST_DATA, $suspendValue);
68 69
         }
69 70
     }
@@ -81,7 +82,8 @@  discard block
 block discarded – undo
81 82
         );
82 83
 
83 84
         $this->assertCount(2, $result);
84
-        foreach ($result as $suspendValue) {
85
+        foreach ($result as $suspendValue)
86
+        {
85 87
             $this->assertSame(self::TEST_DATA, $suspendValue);
86 88
         }
87 89
     }
@@ -114,9 +116,12 @@  discard block
 block discarded – undo
114 116
                     $result = '';
115 117
                     $result .= Fiber::suspend('foo');
116 118
                     $result .= Fiber::suspend('bar');
117
-                    try {
119
+                    try
120
+                    {
118 121
                         $result .= Fiber::suspend('error');
119
-                    } catch (\Throwable $e) {
122
+                    }
123
+                    catch (\Throwable $e)
124
+                    {
120 125
                         $result .= $e->getMessage();
121 126
                     }
122 127
                     return $result . Fiber::suspend('baz');
@@ -150,7 +155,8 @@  discard block
 block discarded – undo
150 155
             $c1 = $container ?? new Container();
151 156
             $c1->bindSingleton('resource', new stdClass());
152 157
 
153
-            $result = $c1->runScoped(static function (Container $c2) use ($load) {
158
+            $result = $c1->runScoped(static function (Container $c2) use ($load)
159
+            {
154 160
                 // check local binding
155 161
                 self::assertTrue($c2->has('foo'));
156 162
                 self::assertInstanceOf(DateTime::class, $c2->get('foo'));
@@ -163,7 +169,8 @@  discard block
 block discarded – undo
163 169
                         $resource = $c3->get('resource');
164 170
                         self::assertInstanceOf(DateTimeImmutable::class, $c3->get('bar'));
165 171
                         self::assertInstanceOf(stdClass::class, $resource);
166
-                        foreach (self::TEST_DATA as $key => $value) {
172
+                        foreach (self::TEST_DATA as $key => $value)
173
+                        {
167 174
                             $resource->$key = $value;
168 175
                             $load === null or $load();
169 176
                             Fiber::suspend($value);
Please login to merge, or discard this patch.
src/Core/tests/Scope/FinalizeAttributeTest.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $root = self::makeContainer();
23 23
 
24
-        $obj = $root->runScoped(static function (Container $c1) {
25
-            $obj = $c1->runScoped(static function (Container $c2) {
24
+        $obj = $root->runScoped(static function (Container $c1){
25
+            $obj = $c1->runScoped(static function (Container $c2){
26 26
                 $obj = $c2->get(AttrScopeFooFinalize::class);
27 27
 
28 28
                 self::assertFalse($obj->finalized);
@@ -124,12 +124,12 @@  discard block
 block discarded – undo
124 124
         self::expectException(FinalizersException::class);
125 125
         self::expectExceptionMessage('An exception has been thrown during finalization of the scope `foo`');
126 126
 
127
-        try {
127
+        try{
128 128
             $root->runScoped(static function (Container $c1): void {
129 129
                 $obj = $c1->get(AttrScopeFooFinalize::class);
130 130
                 $obj->throwException = true;
131 131
             }, name: 'foo');
132
-        } catch (FinalizersException $e) {
132
+        }catch (FinalizersException $e){
133 133
             $this->assertSame('foo', $e->getScope());
134 134
             $this->assertCount(1, $e->getExceptions());
135 135
             // Contains the message from the inner exception.
@@ -147,13 +147,13 @@  discard block
 block discarded – undo
147 147
         self::expectException(FinalizersException::class);
148 148
         self::expectExceptionMessage('3 exceptions have been thrown during finalization of the scope `foo`');
149 149
 
150
-        try {
150
+        try{
151 151
             $root->runScoped(static function (Container $c1): void {
152 152
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
153 153
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
154 154
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
155 155
             }, name: 'foo');
156
-        } catch (FinalizersException $e) {
156
+        }catch (FinalizersException $e){
157 157
             $this->assertSame('foo', $e->getScope());
158 158
             $this->assertCount(3, $e->getExceptions());
159 159
             // Contains the message from the inner exception.
Please login to merge, or discard this patch.
Braces   +22 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,8 +21,10 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $root = self::makeContainer();
23 23
 
24
-        $obj = $root->runScoped(static function (Container $c1) {
25
-            $obj = $c1->runScoped(static function (Container $c2) {
24
+        $obj = $root->runScoped(static function (Container $c1)
25
+        {
26
+            $obj = $c1->runScoped(static function (Container $c2)
27
+            {
26 28
                 $obj = $c2->get(AttrScopeFooFinalize::class);
27 29
 
28 30
                 self::assertFalse($obj->finalized);
@@ -46,8 +48,10 @@  discard block
 block discarded – undo
46 48
         $root->bindSingleton(LoggerInterface::class, FileLogger::class);
47 49
 
48 50
         $obj2 = null;
49
-        $obj = $root->runScoped(static function (Container $c1) use (&$obj2) {
50
-            $obj = $c1->runScoped(static function (Container $c2) use (&$obj2) {
51
+        $obj = $root->runScoped(static function (Container $c1) use (&$obj2)
52
+        {
53
+            $obj = $c1->runScoped(static function (Container $c2) use (&$obj2)
54
+            {
51 55
                 $obj = $c2->get(AttrScopeFooFinalize::class);
52 56
                 $obj2 = $c2->get(AttrScopeFooFinalize::class);
53 57
 
@@ -77,8 +81,10 @@  discard block
 block discarded – undo
77 81
         $root->bindSingleton(LoggerInterface::class, FileLogger::class);
78 82
 
79 83
         $obj2 = null;
80
-        $obj = $root->runScoped(static function (Container $c1) use (&$obj2) {
81
-            $obj = $c1->runScoped(static function (Container $c2) use (&$obj2) {
84
+        $obj = $root->runScoped(static function (Container $c1) use (&$obj2)
85
+        {
86
+            $obj = $c1->runScoped(static function (Container $c2) use (&$obj2)
87
+            {
82 88
                 $obj = $c2->get(AttrFinalize::class);
83 89
                 $obj2 = $c2->get(AttrFinalize::class);
84 90
 
@@ -124,12 +130,15 @@  discard block
 block discarded – undo
124 130
         self::expectException(FinalizersException::class);
125 131
         self::expectExceptionMessage('An exception has been thrown during finalization of the scope `foo`');
126 132
 
127
-        try {
133
+        try
134
+        {
128 135
             $root->runScoped(static function (Container $c1): void {
129 136
                 $obj = $c1->get(AttrScopeFooFinalize::class);
130 137
                 $obj->throwException = true;
131 138
             }, name: 'foo');
132
-        } catch (FinalizersException $e) {
139
+        }
140
+        catch (FinalizersException $e)
141
+        {
133 142
             $this->assertSame('foo', $e->getScope());
134 143
             $this->assertCount(1, $e->getExceptions());
135 144
             // Contains the message from the inner exception.
@@ -147,13 +156,16 @@  discard block
 block discarded – undo
147 156
         self::expectException(FinalizersException::class);
148 157
         self::expectExceptionMessage('3 exceptions have been thrown during finalization of the scope `foo`');
149 158
 
150
-        try {
159
+        try
160
+        {
151 161
             $root->runScoped(static function (Container $c1): void {
152 162
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
153 163
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
154 164
                 $c1->get(AttrScopeFooFinalize::class)->throwException = true;
155 165
             }, name: 'foo');
156
-        } catch (FinalizersException $e) {
166
+        }
167
+        catch (FinalizersException $e)
168
+        {
157 169
             $this->assertSame('foo', $e->getScope());
158 170
             $this->assertCount(3, $e->getExceptions());
159 171
             // Contains the message from the inner exception.
Please login to merge, or discard this patch.
src/Tokenizer/tests/Bootloader/TokenizerListenerBootloaderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $kernel = TestCoreWithTokenizer::create(directories: ['root' => __DIR__], container: $container);
61 61
         $kernel->run();
62 62
 
63
-        $this->assertContains(\dirname(__DIR__) . '/Fixtures/Bootloader', $container->get(TokenizerConfig::class)->getDirectories());
63
+        $this->assertContains(\dirname(__DIR__).'/Fixtures/Bootloader', $container->get(TokenizerConfig::class)->getDirectories());
64 64
     }
65 65
 
66 66
 }
Please login to merge, or discard this patch.
src/AuthHttp/tests/HeaderTransportTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
         $http->setHandler(
28 28
             static function (ServerRequestInterface $request): void {
29
-                if ($request->getAttribute('authContext')->getToken() === null) {
29
+                if ($request->getAttribute('authContext')->getToken() === null){
30 30
                     echo 'no token';
31
-                } else {
31
+                }else{
32 32
                     echo $request->getAttribute('authContext')->getToken()->getID();
33 33
                     echo ':';
34 34
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 
51 51
         $http->setHandler(
52 52
             static function (ServerRequestInterface $request): void {
53
-                if ($request->getAttribute('authContext')->getToken() === null) {
53
+                if ($request->getAttribute('authContext')->getToken() === null){
54 54
                     echo 'no token';
55
-                } else {
55
+                }else{
56 56
                     echo $request->getAttribute('authContext')->getToken()->getID();
57 57
                     echo ':';
58 58
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 
74 74
         $http->setHandler(
75 75
             static function (ServerRequestInterface $request): void {
76
-                if ($request->getAttribute('authContext')->getToken() === null) {
76
+                if ($request->getAttribute('authContext')->getToken() === null){
77 77
                     echo 'no token';
78
-                } else {
78
+                }else{
79 79
                     echo $request->getAttribute('authContext')->getToken()->getID();
80 80
                     echo ':';
81 81
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             }
103 103
         );
104 104
         $response = $http->handle(
105
-            new ServerRequest('GET', '',['X-Auth-Token' => 'bad'], 'php://input')
105
+            new ServerRequest('GET', '', ['X-Auth-Token' => 'bad'], 'php://input')
106 106
         );
107 107
 
108 108
         $this->assertEmpty($response->getHeader('X-Auth-Token'));
Please login to merge, or discard this patch.
src/AuthHttp/tests/CookieTransportTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
         $http->setHandler(
30 30
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
31
-                if ($request->getAttribute('authContext')->getToken() === null) {
31
+                if ($request->getAttribute('authContext')->getToken() === null){
32 32
                     echo 'no token';
33
-                } else {
33
+                }else{
34 34
                     echo $request->getAttribute('authContext')->getToken()->getID();
35 35
                     echo ':';
36 36
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 
53 53
         $http->setHandler(
54 54
             static function (ServerRequestInterface $request, ResponseInterface $response): void {
55
-                if ($request->getAttribute('authContext')->getToken() === null) {
55
+                if ($request->getAttribute('authContext')->getToken() === null){
56 56
                     echo 'no token';
57
-                } else {
57
+                }else{
58 58
                     echo $request->getAttribute('authContext')->getToken()->getID();
59 59
                     echo ':';
60 60
                     echo json_encode($request->getAttribute('authContext')->getToken()->getPayload());
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         $this->assertSame('auth-token=new-token', $cookie[0]);
146 146
 
147
-        $this->assertSame('Expires=' . gmdate(DATE_COOKIE, time() + 3600), $cookie[1]);
147
+        $this->assertSame('Expires='.gmdate(DATE_COOKIE, time() + 3600), $cookie[1]);
148 148
 
149 149
         $this->assertSame('Max-Age=3600', $cookie[2]);
150 150
     }
Please login to merge, or discard this patch.
src/Interceptors/tests/Unit/Context/TargetTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $target = Target::fromReflectionMethod($reflection, self::class);
48 48
 
49 49
         $this->assertSame($reflection, $target->getReflection());
50
-        $this->assertSame(self::class . '->' . __FUNCTION__, (string)$target);
50
+        $this->assertSame(self::class.'->'.__FUNCTION__, (string)$target);
51 51
         $this->assertNull($target->getObject());
52 52
     }
53 53
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $target = Target::fromReflectionMethod($reflection, $this);
59 59
 
60 60
         $this->assertSame($reflection, $target->getReflection());
61
-        $this->assertSame(self::class . '->' . __FUNCTION__, (string)$target);
61
+        $this->assertSame(self::class.'->'.__FUNCTION__, (string)$target);
62 62
         $this->assertNotNull($target->getObject());
63 63
     }
64 64
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $reflection = $target->getReflection();
125 125
         $this->assertSame($hasReflection, $reflection !== null);
126 126
         $this->assertNull($target->getObject());
127
-        if ($hasReflection) {
127
+        if ($hasReflection){
128 128
             $this->assertInstanceOf(\ReflectionMethod::class, $reflection);
129 129
             $this->assertSame($action, $reflection->getName());
130 130
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,8 @@
 block discarded – undo
124 124
         $reflection = $target->getReflection();
125 125
         $this->assertSame($hasReflection, $reflection !== null);
126 126
         $this->assertNull($target->getObject());
127
-        if ($hasReflection) {
127
+        if ($hasReflection)
128
+        {
128 129
             $this->assertInstanceOf(\ReflectionMethod::class, $reflection);
129 130
             $this->assertSame($action, $reflection->getName());
130 131
         }
Please login to merge, or discard this patch.
src/Http/tests/AcceptHeaderItemTest.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public static function emptyItemProvider(): iterable
22 22
     {
23 23
         $values = ['', ' '];
24
-        foreach ($values as $value) {
24
+        foreach ($values as $value){
25 25
             yield from [
26 26
                 [AcceptHeaderItem::fromString($value)],
27 27
                 [new AcceptHeaderItem($value)],
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
     #[DataProvider('qualityBoundariesProvider')]
59 59
     public function testItemQualityBoundaries(float $quality, AcceptHeaderItem $item): void
60 60
     {
61
-        if ($quality > 1) {
61
+        if ($quality > 1){
62 62
             $this->assertEqualsWithDelta(1.0, $item->getQuality(), PHP_FLOAT_EPSILON);
63 63
         }
64 64
 
65
-        if ($quality < 0) {
65
+        if ($quality < 0){
66 66
             $this->assertEqualsWithDelta(0.0, $item->getQuality(), PHP_FLOAT_EPSILON);
67 67
         }
68 68
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     public static function qualityBoundariesProvider(): iterable
74 74
     {
75 75
         $qualities = [-1, 0, 0.5, 1, 2];
76
-        foreach ($qualities as $quality) {
76
+        foreach ($qualities as $quality){
77 77
             yield from [
78 78
                 [$quality, AcceptHeaderItem::fromString("*;q=$quality")],
79 79
                 [$quality, AcceptHeaderItem::fromString("*;Q=$quality")],
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
             ]
107 107
         ];
108 108
 
109
-        foreach ($set as $params) {
109
+        foreach ($set as $params){
110 110
             $formattedParams = [];
111
-            foreach ($params['passed'] as $k => $v) {
111
+            foreach ($params['passed'] as $k => $v){
112 112
                 $formattedParams[] = "$k=$v";
113 113
             }
114 114
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
     public static function emptyItemProvider(): iterable
22 22
     {
23 23
         $values = ['', ' '];
24
-        foreach ($values as $value) {
24
+        foreach ($values as $value)
25
+        {
25 26
             yield from [
26 27
                 [AcceptHeaderItem::fromString($value)],
27 28
                 [new AcceptHeaderItem($value)],
@@ -58,11 +59,13 @@  discard block
 block discarded – undo
58 59
     #[DataProvider('qualityBoundariesProvider')]
59 60
     public function testItemQualityBoundaries(float $quality, AcceptHeaderItem $item): void
60 61
     {
61
-        if ($quality > 1) {
62
+        if ($quality > 1)
63
+        {
62 64
             $this->assertEqualsWithDelta(1.0, $item->getQuality(), PHP_FLOAT_EPSILON);
63 65
         }
64 66
 
65
-        if ($quality < 0) {
67
+        if ($quality < 0)
68
+        {
66 69
             $this->assertEqualsWithDelta(0.0, $item->getQuality(), PHP_FLOAT_EPSILON);
67 70
         }
68 71
 
@@ -73,7 +76,8 @@  discard block
 block discarded – undo
73 76
     public static function qualityBoundariesProvider(): iterable
74 77
     {
75 78
         $qualities = [-1, 0, 0.5, 1, 2];
76
-        foreach ($qualities as $quality) {
79
+        foreach ($qualities as $quality)
80
+        {
77 81
             yield from [
78 82
                 [$quality, AcceptHeaderItem::fromString("*;q=$quality")],
79 83
                 [$quality, AcceptHeaderItem::fromString("*;Q=$quality")],
@@ -106,9 +110,11 @@  discard block
 block discarded – undo
106 110
             ]
107 111
         ];
108 112
 
109
-        foreach ($set as $params) {
113
+        foreach ($set as $params)
114
+        {
110 115
             $formattedParams = [];
111
-            foreach ($params['passed'] as $k => $v) {
116
+            foreach ($params['passed'] as $k => $v)
117
+            {
112 118
                 $formattedParams[] = "$k=$v";
113 119
             }
114 120
 
Please login to merge, or discard this patch.