Skip to content

Commit

Permalink
Fix PHPstan array types
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMuller committed Oct 13, 2024
1 parent a20932f commit 427579c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Stopwatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function start(): self
}

/**
* @param array{array-key, mixed}|null $metadata
* @param array<array-key, mixed>|null $metadata
*/
public function checkpoint(string $label, ?array $metadata = null): self
{
Expand All @@ -45,7 +45,7 @@ public function checkpoint(string $label, ?array $metadata = null): self
/**
* @alias
* @see self::checkpoint()
* @param array{array-key, mixed}|null $metadata
* @param array<array-key, mixed>|null $metadata
*/
public function lap(string $label, ?array $metadata = null): self
{
Expand Down
4 changes: 2 additions & 2 deletions src/StopwatchCheckpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public string $timeSinceLastCheckpointFormatted;

/**
* @param array{array-key, mixed}|null $metadata
* @param array<array-key, mixed>|null $metadata
*/
public function __construct(
public string $label,
Expand Down Expand Up @@ -109,7 +109,7 @@ private function renderMetadata(): string
* @return array{
* label: string,
* time: string,
* metadata: array{array-key, mixed}|null,
* metadata: array<array-key, mixed>|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 @@ -13,7 +13,7 @@
final class StopwatchCheckpointCollection extends Collection
{
/**
* @param array{array-key, mixed}|null $metadata
* @param array<array-key, mixed>|null $metadata
*/
public function addCheckpoint(string $label, ?array $metadata, CarbonImmutable $stopwatchStartTime): self
{
Expand Down

0 comments on commit 427579c

Please sign in to comment.