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:
Maximilian Bösing
2023-02-07 17:14:23 +01:00
committed by GitHub
parent 29bb73b69b
commit bf2bee216a
2 changed files with 12 additions and 1 deletions
+3 -1
View File
@@ -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