Skip to content

Commit

Permalink
Allow Stringable type
Browse files Browse the repository at this point in the history
  • Loading branch information
jeckel committed Mar 25, 2024
1 parent 33ed69e commit ef3df29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Domain/Identity/Identity.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Interface Identity
* @package JeckelLab\Contract\Domain\Identity
* @psalm-immutable
* @template IdentityType of int|string
* @template IdentityType of int|string|Stringable
*/
interface Identity extends Equality, Stringable, JsonSerializable
{
Expand All @@ -26,15 +26,15 @@ interface Identity extends Equality, Stringable, JsonSerializable
public static function new(): static;

/**
* @param int|string $identity
* @param int|string|Stringable $identity
* @return static
* @throws InvalidIdException
*/
public static function from(int|string $identity): static;
public static function from(int|string|Stringable $identity): static;

/**
* @return int|string
* @return int|string|Stringable
* @psalm-return IdentityType
*/
public function id(): int|string;
public function id(): int|string|Stringable;
}

0 comments on commit ef3df29

Please sign in to comment.