@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | $this->container->bind(ServerRequestInterface::class, $request); |
169 | 169 | |
170 | - self::assertSame(['PATH' => 'sample',], $this->input->server->__debugInfo()); |
|
170 | + self::assertSame(['PATH' => 'sample', ], $this->input->server->__debugInfo()); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | public function testIterator(): void |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | |
181 | 181 | $this->container->bind(ServerRequestInterface::class, $request); |
182 | 182 | |
183 | - self::assertSame(['PATH' => 'sample',], iterator_to_array($this->input->server)); |
|
183 | + self::assertSame(['PATH' => 'sample', ], iterator_to_array($this->input->server)); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | public function testSetAndExceptions(): void |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $headers = $acceptHeader->getAll(); |
90 | 90 | self::assertCount(count($expected), $headers); |
91 | 91 | |
92 | - foreach ($expected as $i => $value) { |
|
92 | + foreach ($expected as $i => $value){ |
|
93 | 93 | self::assertSame($value, $headers[$i]->getValue()); |
94 | 94 | } |
95 | 95 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $headers = $acceptHeader->getAll(); |
127 | 127 | self::assertCount(count($expected), $headers); |
128 | 128 | |
129 | - foreach ($expected as $i => $value) { |
|
129 | + foreach ($expected as $i => $value){ |
|
130 | 130 | self::assertSame($value, (string)$headers[$i]); |
131 | 131 | } |
132 | 132 | } |
@@ -89,7 +89,8 @@ discard block |
||
89 | 89 | $headers = $acceptHeader->getAll(); |
90 | 90 | self::assertCount(count($expected), $headers); |
91 | 91 | |
92 | - foreach ($expected as $i => $value) { |
|
92 | + foreach ($expected as $i => $value) |
|
93 | + { |
|
93 | 94 | self::assertSame($value, $headers[$i]->getValue()); |
94 | 95 | } |
95 | 96 | } |
@@ -126,7 +127,8 @@ discard block |
||
126 | 127 | $headers = $acceptHeader->getAll(); |
127 | 128 | self::assertCount(count($expected), $headers); |
128 | 129 | |
129 | - foreach ($expected as $i => $value) { |
|
130 | + foreach ($expected as $i => $value) |
|
131 | + { |
|
130 | 132 | self::assertSame($value, (string)$headers[$i]); |
131 | 133 | } |
132 | 134 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | 'create:jobHandler', |
24 | 24 | ]; |
25 | 25 | |
26 | - foreach ($strings as $string) { |
|
26 | + foreach ($strings as $string){ |
|
27 | 27 | self::assertStringContainsString($string, $result); |
28 | 28 | } |
29 | 29 | } |
@@ -23,7 +23,8 @@ |
||
23 | 23 | 'create:jobHandler', |
24 | 24 | ]; |
25 | 25 | |
26 | - foreach ($strings as $string) { |
|
26 | + foreach ($strings as $string) |
|
27 | + { |
|
27 | 28 | self::assertStringContainsString($string, $result); |
28 | 29 | } |
29 | 30 | } |
@@ -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 | } |
@@ -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); |