@@ -22,6 +22,6 @@ |
||
22 | 22 | */ |
23 | 23 | public function perform(): void |
24 | 24 | { |
25 | - throw new Exception('Unhandled another failed command error at ' . __METHOD__ . ' (line ' . __LINE__ . ')'); |
|
25 | + throw new Exception('Unhandled another failed command error at '.__METHOD__.' (line '.__LINE__.')'); |
|
26 | 26 | } |
27 | 27 | } |
@@ -22,6 +22,6 @@ |
||
22 | 22 | */ |
23 | 23 | public function perform(): void |
24 | 24 | { |
25 | - throw new Exception('Unhandled failed command error at ' . __METHOD__ . ' (line ' . __LINE__ . ')'); |
|
25 | + throw new Exception('Unhandled failed command error at '.__METHOD__.' (line '.__LINE__.')'); |
|
26 | 26 | } |
27 | 27 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function perform(): void |
28 | 28 | { |
29 | - switch ($this->argument('helper')) { |
|
29 | + switch ($this->argument('helper')){ |
|
30 | 30 | case 'verbose': |
31 | 31 | $this->write($this->isVerbose() ? 'true' : 'false'); |
32 | 32 | break; |
@@ -26,7 +26,8 @@ |
||
26 | 26 | |
27 | 27 | public function perform(): void |
28 | 28 | { |
29 | - switch ($this->argument('helper')) { |
|
29 | + switch ($this->argument('helper')) |
|
30 | + { |
|
30 | 31 | case 'verbose': |
31 | 32 | $this->write($this->isVerbose() ? 'true' : 'false'); |
32 | 33 | break; |
@@ -126,10 +126,12 @@ |
||
126 | 126 | $this->assertEquals(1, $output->getCode()); |
127 | 127 | } |
128 | 128 | |
129 | - public function do(OutputInterface $output): void |
|
129 | + public function do{ |
|
130 | + (OutputInterface $output): void |
|
130 | 131 | { |
131 | 132 | $output->write('OK'); |
132 | 133 | } |
134 | + } |
|
133 | 135 | |
134 | 136 | public function err(OutputInterface $output): void |
135 | 137 | { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $headers = $acceptHeader->getAll(); |
119 | 119 | $this->assertCount(count($expected), $headers); |
120 | 120 | |
121 | - foreach ($expected as $i => $value) { |
|
121 | + foreach ($expected as $i => $value){ |
|
122 | 122 | $this->assertSame($value, $headers[$i]->getValue()); |
123 | 123 | } |
124 | 124 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $headers = $acceptHeader->getAll(); |
165 | 165 | $this->assertCount(count($expected), $headers); |
166 | 166 | |
167 | - foreach ($expected as $i => $value) { |
|
167 | + foreach ($expected as $i => $value){ |
|
168 | 168 | $this->assertSame($value, (string)$headers[$i]); |
169 | 169 | } |
170 | 170 | } |
@@ -118,7 +118,8 @@ discard block |
||
118 | 118 | $headers = $acceptHeader->getAll(); |
119 | 119 | $this->assertCount(count($expected), $headers); |
120 | 120 | |
121 | - foreach ($expected as $i => $value) { |
|
121 | + foreach ($expected as $i => $value) |
|
122 | + { |
|
122 | 123 | $this->assertSame($value, $headers[$i]->getValue()); |
123 | 124 | } |
124 | 125 | } |
@@ -164,7 +165,8 @@ discard block |
||
164 | 165 | $headers = $acceptHeader->getAll(); |
165 | 166 | $this->assertCount(count($expected), $headers); |
166 | 167 | |
167 | - foreach ($expected as $i => $value) { |
|
168 | + foreach ($expected as $i => $value) |
|
169 | + { |
|
168 | 170 | $this->assertSame($value, (string)$headers[$i]); |
169 | 171 | } |
170 | 172 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | public function emptyItemProvider(): iterable |
34 | 34 | { |
35 | 35 | $values = ['', ' ']; |
36 | - foreach ($values as $value) { |
|
36 | + foreach ($values as $value){ |
|
37 | 37 | yield from [ |
38 | 38 | [AcceptHeaderItem::fromString($value)], |
39 | 39 | [new AcceptHeaderItem($value)], |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function testItemQualityBoundaries(float $quality, AcceptHeaderItem $item): void |
84 | 84 | { |
85 | - if ($quality > 1) { |
|
85 | + if ($quality > 1){ |
|
86 | 86 | $this->assertSame(1.0, $item->getQuality()); |
87 | 87 | } |
88 | 88 | |
89 | - if ($quality < 0) { |
|
89 | + if ($quality < 0){ |
|
90 | 90 | $this->assertSame(0.0, $item->getQuality()); |
91 | 91 | } |
92 | 92 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function qualityBoundariesProvider(): iterable |
101 | 101 | { |
102 | 102 | $qualities = [-1, 0, 0.5, 1, 2]; |
103 | - foreach ($qualities as $quality) { |
|
103 | + foreach ($qualities as $quality){ |
|
104 | 104 | yield from [ |
105 | 105 | [$quality, AcceptHeaderItem::fromString("*;q=$quality")], |
106 | 106 | [$quality, AcceptHeaderItem::fromString("*;Q=$quality")], |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | ] |
141 | 141 | ]; |
142 | 142 | |
143 | - foreach ($set as $params) { |
|
143 | + foreach ($set as $params){ |
|
144 | 144 | $formattedParams = []; |
145 | - foreach ($params['passed'] as $k => $v) { |
|
145 | + foreach ($params['passed'] as $k => $v){ |
|
146 | 146 | $formattedParams[] = "$k=$v"; |
147 | 147 | } |
148 | 148 |
@@ -33,7 +33,8 @@ discard block |
||
33 | 33 | public function emptyItemProvider(): iterable |
34 | 34 | { |
35 | 35 | $values = ['', ' ']; |
36 | - foreach ($values as $value) { |
|
36 | + foreach ($values as $value) |
|
37 | + { |
|
37 | 38 | yield from [ |
38 | 39 | [AcceptHeaderItem::fromString($value)], |
39 | 40 | [new AcceptHeaderItem($value)], |
@@ -82,11 +83,13 @@ discard block |
||
82 | 83 | */ |
83 | 84 | public function testItemQualityBoundaries(float $quality, AcceptHeaderItem $item): void |
84 | 85 | { |
85 | - if ($quality > 1) { |
|
86 | + if ($quality > 1) |
|
87 | + { |
|
86 | 88 | $this->assertSame(1.0, $item->getQuality()); |
87 | 89 | } |
88 | 90 | |
89 | - if ($quality < 0) { |
|
91 | + if ($quality < 0) |
|
92 | + { |
|
90 | 93 | $this->assertSame(0.0, $item->getQuality()); |
91 | 94 | } |
92 | 95 | |
@@ -100,7 +103,8 @@ discard block |
||
100 | 103 | public function qualityBoundariesProvider(): iterable |
101 | 104 | { |
102 | 105 | $qualities = [-1, 0, 0.5, 1, 2]; |
103 | - foreach ($qualities as $quality) { |
|
106 | + foreach ($qualities as $quality) |
|
107 | + { |
|
104 | 108 | yield from [ |
105 | 109 | [$quality, AcceptHeaderItem::fromString("*;q=$quality")], |
106 | 110 | [$quality, AcceptHeaderItem::fromString("*;Q=$quality")], |
@@ -140,9 +144,11 @@ discard block |
||
140 | 144 | ] |
141 | 145 | ]; |
142 | 146 | |
143 | - foreach ($set as $params) { |
|
147 | + foreach ($set as $params) |
|
148 | + { |
|
144 | 149 | $formattedParams = []; |
145 | - foreach ($params['passed'] as $k => $v) { |
|
150 | + foreach ($params['passed'] as $k => $v) |
|
151 | + { |
|
146 | 152 | $formattedParams[] = "$k=$v"; |
147 | 153 | } |
148 | 154 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | string $clientFilename = null, |
27 | 27 | string $clientMediaType = null |
28 | 28 | ): UploadedFileInterface { |
29 | - if ($size === null) { |
|
29 | + if ($size === null){ |
|
30 | 30 | $size = $stream->getSize(); |
31 | 31 | } |
32 | 32 |
@@ -26,7 +26,8 @@ |
||
26 | 26 | string $clientFilename = null, |
27 | 27 | string $clientMediaType = null |
28 | 28 | ): UploadedFileInterface { |
29 | - if ($size === null) { |
|
29 | + if ($size === null) |
|
30 | + { |
|
30 | 31 | $size = $stream->getSize(); |
31 | 32 | } |
32 | 33 |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $this->container->bind(ServerRequestInterface::class, $request); |
165 | 165 | |
166 | 166 | $this->assertSame( |
167 | - ['PATH' => 'sample',], |
|
167 | + ['PATH' => 'sample', ], |
|
168 | 168 | $this->input->server->__debugInfo() |
169 | 169 | ); |
170 | 170 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $this->container->bind(ServerRequestInterface::class, $request); |
179 | 179 | |
180 | 180 | $this->assertSame( |
181 | - ['PATH' => 'sample',], |
|
181 | + ['PATH' => 'sample', ], |
|
182 | 182 | iterator_to_array($this->input->server) |
183 | 183 | ); |
184 | 184 | } |
@@ -127,9 +127,9 @@ |
||
127 | 127 | $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite); |
128 | 128 | $this->assertSame($expected, $cookie->getSameSite()); |
129 | 129 | |
130 | - if ($expected === null) { |
|
130 | + if ($expected === null){ |
|
131 | 131 | $this->assertStringNotContainsString('SameSite=', $cookie->createHeader()); |
132 | - } else { |
|
132 | + }else{ |
|
133 | 133 | $this->assertStringContainsString("SameSite=$expected", $cookie->createHeader()); |
134 | 134 | } |
135 | 135 | } |
@@ -127,9 +127,12 @@ |
||
127 | 127 | $cookie = new Cookie('', '', 0, '', '', $secure, false, $sameSite); |
128 | 128 | $this->assertSame($expected, $cookie->getSameSite()); |
129 | 129 | |
130 | - if ($expected === null) { |
|
130 | + if ($expected === null) |
|
131 | + { |
|
131 | 132 | $this->assertStringNotContainsString('SameSite=', $cookie->createHeader()); |
132 | - } else { |
|
133 | + } |
|
134 | + else |
|
135 | + { |
|
133 | 136 | $this->assertStringContainsString("SameSite=$expected", $cookie->createHeader()); |
134 | 137 | } |
135 | 138 | } |