@@ -130,17 +130,17 @@ discard block |
||
130 | 130 | ]; |
131 | 131 | |
132 | 132 | $reflectionMethods = []; |
133 | - foreach ($reflection->getMethods() as $method) { |
|
134 | - if ($method->getDeclaringClass()->name !== $reflection->name) { |
|
133 | + foreach ($reflection->getMethods() as $method){ |
|
134 | + if ($method->getDeclaringClass()->name !== $reflection->name){ |
|
135 | 135 | continue; |
136 | 136 | } |
137 | 137 | |
138 | 138 | $reflectionMethods[$method->name] = $method; |
139 | 139 | self::assertArrayHasKey($method->name, $methods); |
140 | 140 | |
141 | - if (!$method->hasReturnType()) { |
|
141 | + if (!$method->hasReturnType()){ |
|
142 | 142 | self::assertNull($methods[$method->name]['hint']); |
143 | - } else { |
|
143 | + }else{ |
|
144 | 144 | self::assertEquals($methods[$method->name]['hint'], $method->getReturnType()->getName()); |
145 | 145 | } |
146 | 146 | } |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | ]; |
181 | 181 | |
182 | 182 | $reflectionMethods = []; |
183 | - foreach ($reflection->getMethods() as $method) { |
|
184 | - if ($method->getDeclaringClass()->name !== $reflection->name) { |
|
183 | + foreach ($reflection->getMethods() as $method){ |
|
184 | + if ($method->getDeclaringClass()->name !== $reflection->name){ |
|
185 | 185 | continue; |
186 | 186 | } |
187 | 187 | $reflectionMethods[$method->name] = $method; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | |
267 | 267 | clearstatcache(); |
268 | 268 | |
269 | - $filename = $this->app->directory('config') . "$name.php"; |
|
269 | + $filename = $this->app->directory('config')."$name.php"; |
|
270 | 270 | self::assertFileExists($filename); |
271 | 271 | |
272 | 272 | return $filename; |
@@ -130,17 +130,22 @@ discard block |
||
130 | 130 | ]; |
131 | 131 | |
132 | 132 | $reflectionMethods = []; |
133 | - foreach ($reflection->getMethods() as $method) { |
|
134 | - if ($method->getDeclaringClass()->name !== $reflection->name) { |
|
133 | + foreach ($reflection->getMethods() as $method) |
|
134 | + { |
|
135 | + if ($method->getDeclaringClass()->name !== $reflection->name) |
|
136 | + { |
|
135 | 137 | continue; |
136 | 138 | } |
137 | 139 | |
138 | 140 | $reflectionMethods[$method->name] = $method; |
139 | 141 | self::assertArrayHasKey($method->name, $methods); |
140 | 142 | |
141 | - if (!$method->hasReturnType()) { |
|
143 | + if (!$method->hasReturnType()) |
|
144 | + { |
|
142 | 145 | self::assertNull($methods[$method->name]['hint']); |
143 | - } else { |
|
146 | + } |
|
147 | + else |
|
148 | + { |
|
144 | 149 | self::assertEquals($methods[$method->name]['hint'], $method->getReturnType()->getName()); |
145 | 150 | } |
146 | 151 | } |
@@ -180,8 +185,10 @@ discard block |
||
180 | 185 | ]; |
181 | 186 | |
182 | 187 | $reflectionMethods = []; |
183 | - foreach ($reflection->getMethods() as $method) { |
|
184 | - if ($method->getDeclaringClass()->name !== $reflection->name) { |
|
188 | + foreach ($reflection->getMethods() as $method) |
|
189 | + { |
|
190 | + if ($method->getDeclaringClass()->name !== $reflection->name) |
|
191 | + { |
|
185 | 192 | continue; |
186 | 193 | } |
187 | 194 | $reflectionMethods[$method->name] = $method; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function tearDown(): void |
41 | 41 | { |
42 | - if ((int)session_status() === PHP_SESSION_ACTIVE) { |
|
42 | + if ((int)session_status() === PHP_SESSION_ACTIVE){ |
|
43 | 43 | session_abort(); |
44 | 44 | } |
45 | 45 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | self::assertSame('default', $section->getName()); |
114 | 114 | |
115 | 115 | $section->set('key', 'value'); |
116 | - foreach ($section as $key => $value) { |
|
116 | + foreach ($section as $key => $value){ |
|
117 | 117 | self::assertSame('key', $key); |
118 | 118 | self::assertSame('value', $value); |
119 | 119 | } |
@@ -39,7 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | public function tearDown(): void |
41 | 41 | { |
42 | - if ((int)session_status() === PHP_SESSION_ACTIVE) { |
|
42 | + if ((int)session_status() === PHP_SESSION_ACTIVE) |
|
43 | + { |
|
43 | 44 | session_abort(); |
44 | 45 | } |
45 | 46 | } |
@@ -113,7 +114,8 @@ discard block |
||
113 | 114 | self::assertSame('default', $section->getName()); |
114 | 115 | |
115 | 116 | $section->set('key', 'value'); |
116 | - foreach ($section as $key => $value) { |
|
117 | + foreach ($section as $key => $value) |
|
118 | + { |
|
117 | 119 | self::assertSame('key', $key); |
118 | 120 | self::assertSame('value', $value); |
119 | 121 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | self::assertSame([], $entity->getValue()); |
69 | 69 | |
70 | 70 | $entity['a'] = 90; |
71 | - foreach ($entity as $key => $value) { |
|
71 | + foreach ($entity as $key => $value){ |
|
72 | 72 | self::assertSame('a', $key); |
73 | 73 | self::assertSame(90, $value); |
74 | 74 | } |
@@ -68,7 +68,8 @@ |
||
68 | 68 | self::assertSame([], $entity->getValue()); |
69 | 69 | |
70 | 70 | $entity['a'] = 90; |
71 | - foreach ($entity as $key => $value) { |
|
71 | + foreach ($entity as $key => $value) |
|
72 | + { |
|
72 | 73 | self::assertSame('a', $key); |
73 | 74 | self::assertSame(90, $value); |
74 | 75 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | $this->files = new Files(); |
22 | 22 | $this->fileSnapshot = new FileSnapshot( |
23 | - __DIR__ . '/snapshots', |
|
23 | + __DIR__.'/snapshots', |
|
24 | 24 | 1, |
25 | 25 | Verbosity::DEBUG, |
26 | 26 | new PlainRenderer(), |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | protected function tearDown(): void |
32 | 32 | { |
33 | - $this->files->deleteDirectory(__DIR__ . '/snapshots'); |
|
33 | + $this->files->deleteDirectory(__DIR__.'/snapshots'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function testCreate(): void |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | self::assertStringContainsString('message', $s->getMessage()); |
45 | 45 | self::assertStringContainsString(__FILE__, $s->getMessage()); |
46 | 46 | self::assertStringContainsString('38', $s->getMessage()); |
47 | - self::assertCount(1, $this->files->getFiles(__DIR__ . '/snapshots')); |
|
47 | + self::assertCount(1, $this->files->getFiles(__DIR__.'/snapshots')); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function testCreateBiggerThanMaxFiles(): void |
@@ -58,6 +58,6 @@ discard block |
||
58 | 58 | self::assertSame($e, $s->getException()); |
59 | 59 | self::assertSame($e2, $s2->getException()); |
60 | 60 | |
61 | - self::assertCount(1, $this->files->getFiles(__DIR__ . '/snapshots')); |
|
61 | + self::assertCount(1, $this->files->getFiles(__DIR__.'/snapshots')); |
|
62 | 62 | } |
63 | 63 | } |
@@ -110,9 +110,9 @@ |
||
110 | 110 | $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite); |
111 | 111 | self::assertSame($expected, $cookie->getSameSite()); |
112 | 112 | |
113 | - if ($expected === null) { |
|
113 | + if ($expected === null){ |
|
114 | 114 | self::assertStringNotContainsString('SameSite=', $cookie->createHeader()); |
115 | - } else { |
|
115 | + }else{ |
|
116 | 116 | self::assertStringContainsString("SameSite=$expected", $cookie->createHeader()); |
117 | 117 | } |
118 | 118 | } |
@@ -110,9 +110,12 @@ |
||
110 | 110 | $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite); |
111 | 111 | self::assertSame($expected, $cookie->getSameSite()); |
112 | 112 | |
113 | - if ($expected === null) { |
|
113 | + if ($expected === null) |
|
114 | + { |
|
114 | 115 | self::assertStringNotContainsString('SameSite=', $cookie->createHeader()); |
115 | - } else { |
|
116 | + } |
|
117 | + else |
|
118 | + { |
|
116 | 119 | self::assertStringContainsString("SameSite=$expected", $cookie->createHeader()); |
117 | 120 | } |
118 | 121 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $core = $this->httpCore([CookiesMiddleware::class]); |
128 | 128 | $core->setHandler(fn(ServerRequestInterface $r) => $r->getCookieParams()['name']); |
129 | 129 | |
130 | - $value = $this->container->get(EncrypterInterface::class)->encrypt('cookie-value') . 'BROKEN'; |
|
130 | + $value = $this->container->get(EncrypterInterface::class)->encrypt('cookie-value').'BROKEN'; |
|
131 | 131 | |
132 | 132 | $response = $this->get($core, '/', [], [], ['name' => $value]); |
133 | 133 | self::assertSame(200, $response->getStatusCode()); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | { |
271 | 271 | $result = []; |
272 | 272 | |
273 | - foreach ($response->getHeaders() as $line) { |
|
273 | + foreach ($response->getHeaders() as $line){ |
|
274 | 274 | $cookie = explode('=', implode('', $line)); |
275 | 275 | $result[$cookie[0]] = rawurldecode(substr( |
276 | 276 | $cookie[1], |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $bag = new FilterBag( |
18 | 18 | $filter = m::mock(FilterInterface::class), |
19 | 19 | $entity = m::mock(AbstractEntity::class), |
20 | - $schema = ['foo' => 'bar',] |
|
20 | + $schema = ['foo' => 'bar', ] |
|
21 | 21 | ); |
22 | 22 | |
23 | 23 | self::assertSame($filter, $bag->filter); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | self::assertSame('["some","elements"]', $serializer->serialize(['some', 'elements'])); |
19 | 19 | self::assertSame(['some', 'elements'], $serializer->unserialize('["some","elements"]')); |
20 | - self::assertSame(['some', 'elements'], $serializer->unserialize(new class() implements \Stringable { |
|
20 | + self::assertSame(['some', 'elements'], $serializer->unserialize(new class() implements \Stringable{ |
|
21 | 21 | public function __toString(): string |
22 | 22 | { |
23 | 23 | return '["some","elements"]'; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | self::assertSame('a:2:{i:0;s:4:"some";i:1;s:8:"elements";}', $serializer->serialize(['some', 'elements'])); |
21 | 21 | self::assertSame(['some', 'elements'], $serializer->unserialize('a:2:{i:0;s:4:"some";i:1;s:8:"elements";}')); |
22 | - self::assertSame(['some', 'elements'], $serializer->unserialize(new class() implements \Stringable { |
|
22 | + self::assertSame(['some', 'elements'], $serializer->unserialize(new class() implements \Stringable{ |
|
23 | 23 | public function __toString(): string |
24 | 24 | { |
25 | 25 | return 'a:2:{i:0;s:4:"some";i:1;s:8:"elements";}'; |