Skip to content

Commit

Permalink
Add array type annotations on Cast interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaanzon committed Oct 2, 2024
1 parent cf86d7a commit b9efc21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Casts/Cast.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@

interface Cast
{
/**
* @param array<string, mixed> $properties
*/
public function cast(DataProperty $property, mixed $value, array $properties, CreationContext $context): mixed;
}
3 changes: 3 additions & 0 deletions src/Casts/IterableItemCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@

interface IterableItemCast
{
/**
* @param array<string, mixed> $properties
*/
public function castIterableItem(DataProperty $property, mixed $value, array $properties, CreationContext $context): mixed;
}

0 comments on commit b9efc21

Please sign in to comment.