@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | * |
11 | 11 | * @see https://github.com/symplify/symplify/issues/2061 |
12 | 12 | */ |
13 | -\register_shutdown_function(static function () { |
|
14 | - $dest = \json_decode(\file_get_contents(__DIR__ . '/composer.json'), true); |
|
13 | +\register_shutdown_function(static function (){ |
|
14 | + $dest = \json_decode(\file_get_contents(__DIR__.'/composer.json'), true); |
|
15 | 15 | |
16 | 16 | $result = [ |
17 | 17 | 'name' => 'spiral/framework', |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | $json = \json_encode($result, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES); |
48 | 48 | |
49 | - \file_put_contents(__DIR__ . '/composer.json', $json . "\n"); |
|
49 | + \file_put_contents(__DIR__.'/composer.json', $json."\n"); |
|
50 | 50 | }); |
51 | 51 | |
52 | 52 |
@@ -10,7 +10,8 @@ |
||
10 | 10 | * |
11 | 11 | * @see https://github.com/symplify/symplify/issues/2061 |
12 | 12 | */ |
13 | -\register_shutdown_function(static function () { |
|
13 | +\register_shutdown_function(static function () |
|
14 | +{ |
|
14 | 15 | $dest = \json_decode(\file_get_contents(__DIR__ . '/composer.json'), true); |
15 | 16 | |
16 | 17 | $result = [ |
@@ -51,11 +51,11 @@ |
||
51 | 51 | public static function unpack(array $payload): MessageInterface |
52 | 52 | { |
53 | 53 | $message = new Message($payload['subject'], $payload['to'], $payload['data']); |
54 | - if ($payload['from'] !== null) { |
|
54 | + if ($payload['from'] !== null){ |
|
55 | 55 | $message->setFrom($payload['from']); |
56 | 56 | } |
57 | 57 | |
58 | - if ($payload['replyTo'] !== null) { |
|
58 | + if ($payload['replyTo'] !== null){ |
|
59 | 59 | $message->setReplyTo($payload['replyTo']); |
60 | 60 | } |
61 | 61 |
@@ -51,11 +51,13 @@ |
||
51 | 51 | public static function unpack(array $payload): MessageInterface |
52 | 52 | { |
53 | 53 | $message = new Message($payload['subject'], $payload['to'], $payload['data']); |
54 | - if ($payload['from'] !== null) { |
|
54 | + if ($payload['from'] !== null) |
|
55 | + { |
|
55 | 56 | $message->setFrom($payload['from']); |
56 | 57 | } |
57 | 58 | |
58 | - if ($payload['replyTo'] !== null) { |
|
59 | + if ($payload['replyTo'] !== null) |
|
60 | + { |
|
59 | 61 | $message->setReplyTo($payload['replyTo']); |
60 | 62 | } |
61 | 63 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | */ |
8 | 8 | $_msg_->subject(\Spiral\SendIt\Renderer\ViewRenderer::escapeSubject(inject('subject'))); |
9 | 9 | |
10 | -if (injected('from')) { |
|
10 | +if (injected('from')){ |
|
11 | 11 | $_msg_->from(\Symfony\Component\Mime\Address::create(inject('from'))); |
12 | 12 | } |
13 | 13 | |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | |
20 | 20 | ob_start(); ?>${html}<?php $_html_ = ob_get_clean(); |
21 | 21 | |
22 | -if (!empty($_html_)) { |
|
22 | +if (!empty($_html_)){ |
|
23 | 23 | $_msg_->html($_html_); |
24 | 24 | } |
25 | 25 | |
26 | 26 | ob_start(); ?>${text}<?php $_text_ = ob_get_clean(); |
27 | 27 | |
28 | -if (!empty($_text_)) { |
|
28 | +if (!empty($_text_)){ |
|
29 | 29 | $_msg_->text($_text_); |
30 | 30 | } |
31 | 31 | ?> |
@@ -7,7 +7,8 @@ discard block |
||
7 | 7 | */ |
8 | 8 | $_msg_->subject(\Spiral\SendIt\Renderer\ViewRenderer::escapeSubject(inject('subject'))); |
9 | 9 | |
10 | -if (injected('from')) { |
|
10 | +if (injected('from')) |
|
11 | +{ |
|
11 | 12 | $_msg_->from(\Symfony\Component\Mime\Address::create(inject('from'))); |
12 | 13 | } |
13 | 14 | |
@@ -19,13 +20,15 @@ discard block |
||
19 | 20 | |
20 | 21 | ob_start(); ?>${html}<?php $_html_ = ob_get_clean(); |
21 | 22 | |
22 | -if (!empty($_html_)) { |
|
23 | +if (!empty($_html_)) |
|
24 | +{ |
|
23 | 25 | $_msg_->html($_html_); |
24 | 26 | } |
25 | 27 | |
26 | 28 | ob_start(); ?>${text}<?php $_text_ = ob_get_clean(); |
27 | 29 | |
28 | -if (!empty($_text_)) { |
|
30 | +if (!empty($_text_)) |
|
31 | +{ |
|
29 | 32 | $_msg_->text($_text_); |
30 | 33 | } |
31 | 34 | ?> |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | $resolver = $this->getResolver(); |
33 | 33 | |
34 | - if ($resolver === null) { |
|
34 | + if ($resolver === null){ |
|
35 | 35 | throw new \LogicException('Can not generate public url: File not accessible by HTTP'); |
36 | 36 | } |
37 | 37 |
@@ -31,7 +31,8 @@ |
||
31 | 31 | { |
32 | 32 | $resolver = $this->getResolver(); |
33 | 33 | |
34 | - if ($resolver === null) { |
|
34 | + if ($resolver === null) |
|
35 | + { |
|
35 | 36 | throw new \LogicException('Can not generate public url: File not accessible by HTTP'); |
36 | 37 | } |
37 | 38 |
@@ -151,7 +151,8 @@ |
||
151 | 151 | |
152 | 152 | $actual = ''; |
153 | 153 | $stream = $this->local->getStream('file.txt'); |
154 | - while (!\feof($stream)) { |
|
154 | + while (!\feof($stream)) |
|
155 | + { |
|
155 | 156 | $actual .= \fread($stream, 256); |
156 | 157 | } |
157 | 158 | \fclose($stream); |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | public function testVisibility(): void |
47 | 47 | { |
48 | 48 | $this->markTestSkipped( |
49 | - 'This test [' . __FUNCTION__ . '] returns incorrect visibility ' . |
|
50 | - 'of files on Windows OS. ' . |
|
49 | + 'This test ['.__FUNCTION__.'] returns incorrect visibility '. |
|
50 | + 'of files on Windows OS. '. |
|
51 | 51 | 'It is required to understand the situation', |
52 | 52 | ); |
53 | 53 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | $actual = ''; |
142 | 142 | $stream = $this->local->getStream('file.txt'); |
143 | - while (!\feof($stream)) { |
|
143 | + while (!\feof($stream)){ |
|
144 | 144 | $actual .= \fread($stream, 256); |
145 | 145 | } |
146 | 146 | \fclose($stream); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function testLastModified(): void |
166 | 166 | { |
167 | - $now = (int) \floor(\microtime(true)); |
|
167 | + $now = (int)\floor(\microtime(true)); |
|
168 | 168 | |
169 | 169 | $this->local->create('file.txt'); |
170 | 170 | $before = $this->local->getLastModified('file.txt'); |
@@ -257,7 +257,8 @@ |
||
257 | 257 | |
258 | 258 | $actual = ''; |
259 | 259 | $stream = $this->manager->getStream('file.txt'); |
260 | - while (!\feof($stream)) { |
|
260 | + while (!\feof($stream)) |
|
261 | + { |
|
261 | 262 | $actual .= \fread($stream, 256); |
262 | 263 | } |
263 | 264 | \fclose($stream); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | { |
71 | 71 | $this->expectException(InvalidArgumentException::class); |
72 | 72 | $this->expectExceptionMessage( |
73 | - 'URI argument must be a valid URI in ' . |
|
73 | + 'URI argument must be a valid URI in '. |
|
74 | 74 | '"[STORAGE]://[PATH_TO_FILE]" format, but `test://` given', |
75 | 75 | ); |
76 | 76 | |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | public function testVisibility(): void |
136 | 136 | { |
137 | 137 | $this->markTestSkipped( |
138 | - 'This test [' . __FUNCTION__ . '] returns incorrect visibility ' . |
|
139 | - 'of files on Windows OS. ' . |
|
138 | + 'This test ['.__FUNCTION__.'] returns incorrect visibility '. |
|
139 | + 'of files on Windows OS. '. |
|
140 | 140 | 'It is required to understand the situation', |
141 | 141 | ); |
142 | 142 | |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | |
236 | 236 | $actual = ''; |
237 | 237 | $stream = $this->manager->getStream('file.txt'); |
238 | - while (!\feof($stream)) { |
|
238 | + while (!\feof($stream)){ |
|
239 | 239 | $actual .= \fread($stream, 256); |
240 | 240 | } |
241 | 241 | \fclose($stream); |
@@ -190,7 +190,8 @@ |
||
190 | 190 | |
191 | 191 | $actual = ''; |
192 | 192 | $stream = $source->getStream(); |
193 | - while (!\feof($stream)) { |
|
193 | + while (!\feof($stream)) |
|
194 | + { |
|
194 | 195 | $actual .= \fread($stream, 256); |
195 | 196 | } |
196 | 197 | \fclose($stream); |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | public function testVisibility(): void |
73 | 73 | { |
74 | 74 | $this->markTestSkipped( |
75 | - 'This test [' . __FUNCTION__ . '] returns incorrect visibility ' . |
|
76 | - 'of files on Windows OS. ' . |
|
75 | + 'This test ['.__FUNCTION__.'] returns incorrect visibility '. |
|
76 | + 'of files on Windows OS. '. |
|
77 | 77 | 'It is required to understand the situation', |
78 | 78 | ); |
79 | 79 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | $actual = ''; |
183 | 183 | $stream = $source->getStream(); |
184 | - while (!\feof($stream)) { |
|
184 | + while (!\feof($stream)){ |
|
185 | 185 | $actual .= \fread($stream, 256); |
186 | 186 | } |
187 | 187 | \fclose($stream); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | public function testLastModified(): void |
209 | 209 | { |
210 | - $now = (int) \floor(\microtime(true)); |
|
210 | + $now = (int)\floor(\microtime(true)); |
|
211 | 211 | |
212 | 212 | $file = $this->local->file('file.txt') |
213 | 213 | ->create() |
@@ -22,11 +22,11 @@ |
||
22 | 22 | * @var string |
23 | 23 | * @psalm-var VisibilityType |
24 | 24 | */ |
25 | - public const VISIBILITY_PUBLIC = \League\Flysystem\Visibility::PUBLIC; |
|
25 | + public const VISIBILITY_PUBLIC = \League\Flysystem\Visibility::public; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @var string |
29 | 29 | * @psalm-var VisibilityType |
30 | 30 | */ |
31 | - public const VISIBILITY_PRIVATE = \League\Flysystem\Visibility::PRIVATE; |
|
31 | + public const VISIBILITY_PRIVATE = \League\Flysystem\Visibility::private; |
|
32 | 32 | } |
@@ -37,7 +37,8 @@ |
||
37 | 37 | |
38 | 38 | public function render(Directive $directive): ?string |
39 | 39 | { |
40 | - if (!$this->hasDirective($directive->name)) { |
|
40 | + if (!$this->hasDirective($directive->name)) |
|
41 | + { |
|
41 | 42 | return null; |
42 | 43 | } |
43 | 44 |
@@ -23,15 +23,15 @@ |
||
23 | 23 | |
24 | 24 | public function hasDirective(string $name): bool |
25 | 25 | { |
26 | - return $this->r->hasMethod('render' . \ucfirst($name)); |
|
26 | + return $this->r->hasMethod('render'.\ucfirst($name)); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function render(Directive $directive): ?string |
30 | 30 | { |
31 | - if (!$this->hasDirective($directive->name)) { |
|
31 | + if (!$this->hasDirective($directive->name)){ |
|
32 | 32 | return null; |
33 | 33 | } |
34 | 34 | |
35 | - return \call_user_func([$this, 'render' . \ucfirst($directive->name)], $directive); |
|
35 | + return \call_user_func([$this, 'render'.\ucfirst($directive->name)], $directive); |
|
36 | 36 | } |
37 | 37 | } |