Skip to content

Commit

Permalink
Update metadata array key docblock type
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMuller committed Jun 21, 2024
1 parent a32d0b1 commit e78bdc6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Stopwatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function start(): self
}

/**
* @param array{array-key, int|float|string|null|bool|Stringable}|null $metadata
* @param array{int|string, int|float|string|null|bool|Stringable}|null $metadata
*/
public function checkpoint(string $label, ?array $metadata = null): self
{
Expand All @@ -46,7 +46,7 @@ public function checkpoint(string $label, ?array $metadata = null): self
/**
* @alias
* @see self::checkpoint()
* @param array{array-key, int|float|string|null|bool|Stringable}|null $metadata
* @param array{int|string, int|float|string|null|bool|Stringable}|null $metadata
*/
public function lap(string $label, ?array $metadata = null): self
{
Expand Down Expand Up @@ -193,7 +193,7 @@ public function __toString(): string
* @return array{
* startTime: non-falsy-string,
* endTime: non-falsy-string|null,
* checkpoints: array<array-key, mixed>,
* checkpoints: array<int|string, mixed>,
* totalRunDuration: string,
* totalRunDurationMs: int,
* }
Expand Down
4 changes: 2 additions & 2 deletions src/StopwatchCheckpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public string $timeSinceLastCheckpointFormatted;

/**
* @param array{array-key, int|float|string|null|bool|Stringable}|null $metadata
* @param array{int|string, int|float|string|null|bool|Stringable}|null $metadata
*/
public function __construct(
public string $label,
Expand Down Expand Up @@ -104,7 +104,7 @@ private function renderMetadata(): string
* @return array{
* label: string,
* time: string,
* metadata: array{array-key, int|float|string|null|bool|Stringable}|null,
* metadata: array{int|string, int|float|string|null|bool|Stringable}|null,
* totalTimeElapsedMs: int,
* totalTimeElapsedFormatted: string,
* timeSinceLastCheckpointMs: int,
Expand Down
2 changes: 1 addition & 1 deletion src/StopwatchCheckpointCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
final class StopwatchCheckpointCollection extends Collection
{
/**
* @param array{array-key, int|float|string|null|bool|Stringable}|null $metadata
* @param array{int|string, int|float|string|null|bool|Stringable}|null $metadata
*/
public function addCheckpoint(string $label, ?array $metadata, CarbonImmutable $stopwatchStartTime): self
{
Expand Down

0 comments on commit e78bdc6

Please sign in to comment.