Skip to content

Commit

Permalink
qa
Browse files Browse the repository at this point in the history
  • Loading branch information
romm committed Jan 18, 2025
1 parent fbd866d commit 617c476
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions qa/Benchmark/Fixtures/City.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
declare(strict_types = 1);

declare(strict_types=1);

namespace CuyZ\Valinor\QA\Benchmark\Fixtures;

Expand All @@ -10,7 +11,6 @@ final class City
public function __construct(
/** @var non-empty-string */
public readonly string $name,

public readonly DateTimeZone $timeZone,
) {}
}
3 changes: 2 additions & 1 deletion qa/Benchmark/Fixtures/Country.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
declare(strict_types = 1);

declare(strict_types=1);

namespace CuyZ\Valinor\QA\Benchmark\Fixtures;

Expand Down
9 changes: 4 additions & 5 deletions qa/Benchmark/MapperBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use PhpBench\Attributes\Subject;

use function array_fill;
use function json_encode;

final class MapperBench
{
Expand Down Expand Up @@ -42,11 +41,11 @@ public function stringArray(): void
{
$mapper = (new MapperBuilder())->mapper();

$json = json_encode(array_fill(0, 100, 'foo'));
$value = array_fill(0, 100, 'foo');

$country = $mapper->map(
$mapper->map(
'list<string>',
Source::json($json),
$value,
);
}

Expand All @@ -64,7 +63,7 @@ public function readme(): void
}
JSON;

$country = $mapper->map(
$mapper->map(
Country::class,
Source::json($json),
);
Expand Down

0 comments on commit 617c476

Please sign in to comment.