Skip to content

refac: let ValueObject extend from Stringable interface #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/Contracts/Domain/ValueObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}