Skip to content

Commit

Permalink
chore: apply mago fmt
Browse files Browse the repository at this point in the history
Signed-off-by: azjezz <[email protected]>
  • Loading branch information
azjezz committed Dec 9, 2024
1 parent 1cca70d commit 0c726da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Psl/DateTime/Duration.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ private function __construct(
public static function fromParts(int $hours, int $minutes = 0, int $seconds = 0, int $nanoseconds = 0): self
{
// This is where the normalization happens.
$s =
(SECONDS_PER_HOUR * $hours) + (SECONDS_PER_MINUTE * $minutes) +
$s = (SECONDS_PER_HOUR * $hours) + (SECONDS_PER_MINUTE * $minutes) +
$seconds + ((int) ($nanoseconds / NANOSECONDS_PER_SECOND));
$ns = $nanoseconds % NANOSECONDS_PER_SECOND;
if ($s < 0 && $ns > 0) {
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/Result/FailureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public function testProceed(): void
{
$exception = new Exception('bar');
$wrapper = new Failure($exception);
$actual = $wrapper->proceed(static fn(string $_result): int => 200, static fn(Exception $_exception): int => 404);
$actual = $wrapper->proceed(
static fn(string $_result): int => 200,
static fn(Exception $_exception): int => 404,
);

static::assertSame(404, $actual);
}
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/Result/SuccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public function testGetException(): void
public function testProceed(): void
{
$wrapper = new Success('hello');
$actual = $wrapper->proceed(static fn(string $_result): int => 200, static fn(Exception $_exception): int => 404);
$actual = $wrapper->proceed(
static fn(string $_result): int => 200,
static fn(Exception $_exception): int => 404,
);

static::assertSame(200, $actual);
}
Expand Down

0 comments on commit 0c726da

Please sign in to comment.