From 757fb60713b8f268c72407d6235b8856048d13ec Mon Sep 17 00:00:00 2001 From: Bl00D4NGEL Date: Wed, 29 Mar 2023 10:17:38 +0200 Subject: [PATCH] refac: let ValueObject extend from Stringable interface --- src/Contracts/Domain/ValueObject.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Contracts/Domain/ValueObject.php b/src/Contracts/Domain/ValueObject.php index a97c2d7..4034980 100644 --- a/src/Contracts/Domain/ValueObject.php +++ b/src/Contracts/Domain/ValueObject.php @@ -4,7 +4,9 @@ namespace GeekCell\Ddd\Contracts\Domain; -interface ValueObject +use Stringable; + +interface ValueObject extends Stringable { /** * Check if the given object is equal to the current object. @@ -20,11 +22,4 @@ public function equals(ValueObject $object): bool; * @return mixed */ public function getValue(): mixed; - - /** - * Return the string representation of the value object. - * - * @return string - */ - public function __toString(): string; }