Skip to content

Commit 48a3443

Browse files
authored
refactor: let ValueObject extend from Stringable interface (#14)
1 parent 1848c02 commit 48a3443

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Contracts/Domain/ValueObject.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
namespace GeekCell\Ddd\Contracts\Domain;
66

7-
interface ValueObject
7+
use Stringable;
8+
9+
interface ValueObject extends Stringable
810
{
911
/**
1012
* Check if the given object is equal to the current object.
@@ -20,11 +22,4 @@ public function equals(ValueObject $object): bool;
2022
* @return mixed
2123
*/
2224
public function getValue(): mixed;
23-
24-
/**
25-
* Return the string representation of the value object.
26-
*
27-
* @return string
28-
*/
29-
public function __toString(): string;
3025
}

0 commit comments

Comments
 (0)