From 1273cfaf39c5927a7ce51b2433c3637df4897dc7 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 30 Nov 2019 14:15:06 -0800 Subject: [PATCH] Update param typehint to accept UuidInterface as v3/v5 namespace --- src/Uuid.php | 4 ++-- src/UuidFactoryInterface.php | 4 ++-- src/functions.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Uuid.php b/src/Uuid.php index b5d546a..cba8c7e 100644 --- a/src/Uuid.php +++ b/src/Uuid.php @@ -706,7 +706,7 @@ class Uuid implements UuidInterface * Generate a version 3 UUID based on the MD5 hash of a namespace identifier * (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface * @throws InvalidUuidStringException @@ -733,7 +733,7 @@ class Uuid implements UuidInterface * Generate a version 5 UUID based on the SHA-1 hash of a namespace * identifier (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface * @throws InvalidUuidStringException diff --git a/src/UuidFactoryInterface.php b/src/UuidFactoryInterface.php index f78dda2..1c1651d 100644 --- a/src/UuidFactoryInterface.php +++ b/src/UuidFactoryInterface.php @@ -45,7 +45,7 @@ interface UuidFactoryInterface * Generate a version 3 UUID based on the MD5 hash of a namespace identifier * (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface * @throws InvalidUuidStringException @@ -66,7 +66,7 @@ interface UuidFactoryInterface * Generate a version 5 UUID based on the SHA-1 hash of a namespace * identifier (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface * @throws InvalidUuidStringException diff --git a/src/functions.php b/src/functions.php index cae9bd6..8d18155 100644 --- a/src/functions.php +++ b/src/functions.php @@ -39,7 +39,7 @@ function v1($node = null, $clockSeq = null) { * Generate a version 3 UUID based on the MD5 hash of a namespace identifier * (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return string * @throws InvalidUuidStringException @@ -64,7 +64,7 @@ function v4() { * Generate a version 5 UUID based on the SHA-1 hash of a namespace * identifier (which is a UUID) and a name (which is a string). * - * @param string $ns The UUID namespace in which to create the named UUID + * @param string|UuidInterface $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return string * @throws InvalidUuidStringException