mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-15 16:07:55 +03:00
Increase PHPStan levels and update code to resolve issues found
This commit is contained in:
@@ -92,7 +92,7 @@ class DefaultTimeGenerator implements TimeGeneratorInterface
|
||||
// Create a 60-bit time value as a count of 100-nanosecond intervals
|
||||
// since 00:00:00.00, 15 October 1582
|
||||
$timeOfDay = $this->timeProvider->currentTime();
|
||||
$uuidTime = $this->timeConverter->calculateTime($timeOfDay['sec'], $timeOfDay['usec']);
|
||||
$uuidTime = $this->timeConverter->calculateTime((string) $timeOfDay['sec'], (string) $timeOfDay['usec']);
|
||||
|
||||
$timeHi = BinaryUtils::applyVersion($uuidTime['hi'], 1);
|
||||
$clockSeqHi = BinaryUtils::applyVariant($clockSeq >> 8);
|
||||
@@ -109,14 +109,14 @@ class DefaultTimeGenerator implements TimeGeneratorInterface
|
||||
]
|
||||
);
|
||||
|
||||
return hex2bin($hex);
|
||||
return (string) hex2bin($hex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses the node provider given when constructing this instance to get
|
||||
* the node ID (usually a MAC address)
|
||||
*
|
||||
* @param string|int $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 Hexadecimal representation of the node ID
|
||||
* @throws InvalidArgumentException
|
||||
* @throws Exception
|
||||
|
||||
Reference in New Issue
Block a user