mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Add explicit Stringable interface to UuidInterface (#491)
Even tho, the `Stringable` interface is implicit on all objects containing the method `__toString`, it is recommended by PHP to explicitly setting that interface. From php.net documentation: > [...] Unlike most interfaces, **Stringable** is implicitly present on any class that has the magic `__toString()` method defined, although it can and should be declared explicitly. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
29bb73b69b
commit
bf2bee216a
@@ -19,6 +19,7 @@ use Ramsey\Uuid\Fields\FieldsInterface;
|
||||
use Ramsey\Uuid\Type\Hexadecimal;
|
||||
use Ramsey\Uuid\Type\Integer as IntegerObject;
|
||||
use Serializable;
|
||||
use Stringable;
|
||||
|
||||
/**
|
||||
* A UUID is a universally unique identifier adhering to an agreed-upon
|
||||
@@ -29,7 +30,8 @@ use Serializable;
|
||||
interface UuidInterface extends
|
||||
DeprecatedUuidInterface,
|
||||
JsonSerializable,
|
||||
Serializable
|
||||
Serializable,
|
||||
Stringable
|
||||
{
|
||||
/**
|
||||
* Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than
|
||||
|
||||
Reference in New Issue
Block a user