Increase PHPStan levels and update code to resolve issues found

This commit is contained in:
SignpostMarv
2018-01-27 19:45:35 +00:00
committed by Ben Ramsey
parent a2ba41740c
commit 0030399564
26 changed files with 82 additions and 84 deletions
+3 -3
View File
@@ -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