aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php')
-rw-r--r--vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php28
1 files changed, 23 insertions, 5 deletions
diff --git a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php
index a1b39b04a..d245c7bcc 100644
--- a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php
@@ -40,11 +40,29 @@ use const STR_PAD_LEFT;
*/
class DefaultTimeGenerator implements TimeGeneratorInterface
{
+ /**
+ * @var NodeProviderInterface
+ */
+ private $nodeProvider;
+
+ /**
+ * @var TimeConverterInterface
+ */
+ private $timeConverter;
+
+ /**
+ * @var TimeProviderInterface
+ */
+ private $timeProvider;
+
public function __construct(
- private NodeProviderInterface $nodeProvider,
- private TimeConverterInterface $timeConverter,
- private TimeProviderInterface $timeProvider
+ NodeProviderInterface $nodeProvider,
+ TimeConverterInterface $timeConverter,
+ TimeProviderInterface $timeProvider
) {
+ $this->nodeProvider = $nodeProvider;
+ $this->timeConverter = $timeConverter;
+ $this->timeProvider = $timeProvider;
}
/**
@@ -103,13 +121,13 @@ class DefaultTimeGenerator implements TimeGeneratorInterface
* Uses the node provider given when constructing this instance to get
* the node ID (usually a MAC address)
*
- * @param int|string|null $node A node value that may be used to override the node provider
+ * @param string|int|null $node A node value that may be used to override the node provider
*
* @return string 6-byte binary string representation of the node
*
* @throws InvalidArgumentException
*/
- private function getValidNode(int | string | null $node): string
+ private function getValidNode($node): string
{
if ($node === null) {
$node = $this->nodeProvider->getNode();