Skip to content

Commit 826aa63

Browse files
authored
chore: update mago to version 0.20.0 (#521)
Signed-off-by: azjezz <[email protected]>
1 parent 10bd1e0 commit 826aa63

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+95
-29
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"php-standard-library/psalm-plugin": "^2.3.0",
2626
"php-coveralls/php-coveralls": "^2.7.0",
2727
"roave/infection-static-analysis-plugin": "^1.36.0",
28-
"carthage-software/mago": "^0.19.0"
28+
"carthage-software/mago": "^0.20.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

composer.lock

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/mago.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ paths = ["src", "tests", "examples"]
55
includes = ["vendor"]
66
excludes = []
77

8+
[format]
9+
empty_line_after_control_structure = true
10+
empty_line_before_dangling_comments = false
11+
812
[linter]
913
plugins = ["php-unit"]
1014

@@ -59,7 +63,3 @@ level = "off"
5963
[[linter.rules]]
6064
name = "safety/no-global"
6165
level = "off"
62-
63-
[[linter.rules]]
64-
name = "best-practices/no-boolean-flag-parameter"
65-
level = "off"

src/Psl/Async/Semaphore.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public function waitFor(mixed $input): mixed
8383
foreach ($this->waits as $suspension) {
8484
$suspension->resume();
8585
}
86+
8687
$this->waits = [];
8788
}
8889

src/Psl/Async/Sequence.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public function waitFor(mixed $input): mixed
7676
foreach ($this->waits as $suspension) {
7777
$suspension->resume();
7878
}
79+
7980
$this->waits = [];
8081

8182
$this->ingoing = false;

src/Psl/DateTime/TemporalConvenienceMethodsTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ public function toString(
392392
*
393393
* @psalm-mutation-free
394394
*/
395+
#[\Override]
395396
public function __toString(): string
396397
{
397398
return $this->toString();

src/Psl/Encoding/Base64/Internal/Base64.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public static function encode(string $binary, bool $padding = true): string
5252
static::encode6Bits((($byte1 << 2) | ($byte2 >> 6)) & 63) .
5353
static::encode6Bits($byte2 & 63);
5454
}
55+
5556
if ($i < $binary_length) {
5657
/**
5758
* @psalm-suppress InvalidArgument
@@ -127,6 +128,7 @@ public static function decode(string $base64, bool $explicit_padding = true): st
127128
);
128129
$err |= ($char0 | $char1 | $char2 | $char3) >> 8;
129130
}
131+
130132
if ($i < $base64_length) {
131133
/**
132134
* @psalm-suppress InvalidArgument
@@ -148,6 +150,7 @@ public static function decode(string $base64, bool $explicit_padding = true): st
148150
$err |= 1;
149151
}
150152
}
153+
151154
$check = $err === 0;
152155
if (!$check) {
153156
throw new Exception\RangeException('Expected characters in the correct base64 alphabet');
@@ -187,7 +190,6 @@ protected static function encode6Bits(int $bin): string
187190
$diff -= ((61 - $bin) >> 8) & 15;
188191
// if ($bin > 62) $diff += 0x2f - 0x2b - 1; // 3
189192
$diff += ((62 - $bin) >> 8) & 3;
190-
191193
return pack('C', $bin + $diff);
192194
}
193195

src/Psl/Env/args.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function args(): array
1717
if (null === $args) {
1818
return [];
1919
}
20+
2021
// @codeCoverageIgnoreEnd
2122

2223
return $args;

src/Psl/Env/current_exec.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ function current_exec(): string
1818
/** @psalm-suppress MissingThrowsDocblock */
1919
$executable = Filesystem\read_symbolic_link($executable);
2020
}
21+
2122
// @codeCoverageIgnoreEnd
2223

2324
return $executable;

src/Psl/File/Internal/ResourceHandle.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function getSize(): int
8282
} catch (IO\Exception\RuntimeException $previous) {
8383
throw new File\Exception\RuntimeException($previous->getMessage(), previous: $previous);
8484
}
85+
8586
// @codeCoverageIgnoreEnd
8687

8788
return $size;

0 commit comments

Comments
 (0)