mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +03:00
add typehints and return types
This commit is contained in:
committed by
Ben Ramsey
parent
3e81dad348
commit
0e7cdfe620
@@ -38,7 +38,7 @@ class FallbackNodeProvider implements NodeProviderInterface
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getNode()
|
||||
public function getNode(): ?string
|
||||
{
|
||||
foreach ($this->nodeProviders as $provider) {
|
||||
if ($node = $provider->getNode()) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class RandomNodeProvider implements NodeProviderInterface
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getNode()
|
||||
public function getNode(): string
|
||||
{
|
||||
try {
|
||||
$nodeBytes = random_bytes(6);
|
||||
|
||||
@@ -569,6 +569,9 @@ class Uuid implements UuidInterface
|
||||
return (int) hexdec($this->getTimestampHex());
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getTimestampHex(): string
|
||||
{
|
||||
if ($this->getVersion() !== 1) {
|
||||
|
||||
Reference in New Issue
Block a user