Skip to content

Commit

Permalink
style(php-cs-fixer): lint php files and fix coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and github-actions[bot] committed May 25, 2024
1 parent 7262bde commit 620cf1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/Support/Caster/Trace.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public function __construct(
public readonly float $delta,
public readonly int $memory,
public readonly array $stack,
) {
}
) {}

public function __toString(): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Support/Caster/TraceFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ final class TraceFile
*/
public function __construct(
public readonly array $line,
) {
}
) {}

public function __toString(): string
{
Expand Down
8 changes: 4 additions & 4 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ function tr(mixed ...$values): mixed
try {
if ($values === []) {
$previous = $time;
$mem = $time = \microtime(true);
$mem = $time = microtime(true);
return TrapHandle::fromTicker(
$counter,
$counter === 0 ? 0 : $mem - $previous,
memory_get_usage(),
)->return();
}

$mem = $time = \microtime(true);
$mem = $time = microtime(true);
/** @psalm-suppress InternalMethod */
return TrapHandle::fromArray($values)->return();
} finally {
$mem === $time and $time = \microtime(true);
$mem === $time and $time = microtime(true);
}
}

Expand All @@ -80,7 +80,7 @@ function tr(mixed ...$values): mixed
*/
function td(mixed ...$values): never
{
\tr(...$values);
tr(...$values);
die;
}

Expand Down

0 comments on commit 620cf1a

Please sign in to comment.