Skip to content

Commit

Permalink
Merge pull request #876 from adriaanzon/cast-types
Browse files Browse the repository at this point in the history
Add array type annotations on Cast interfaces
  • Loading branch information
rubenvanassche authored Oct 4, 2024
2 parents b65bfc0 + b9efc21 commit 592b930
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 592b930

Please sign in to comment.