add typehints and return types

This commit is contained in:
Massimiliano Arione
2019-09-12 15:47:49 +02:00
committed by Ben Ramsey
parent 3e81dad348
commit 0e7cdfe620
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -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()) {
+1 -1
View File
@@ -27,7 +27,7 @@ class RandomNodeProvider implements NodeProviderInterface
/**
* @inheritDoc
*/
public function getNode()
public function getNode(): string
{
try {
$nodeBytes = random_bytes(6);
+3
View File
@@ -569,6 +569,9 @@ class Uuid implements UuidInterface
return (int) hexdec($this->getTimestampHex());
}
/**
* @inheritdoc
*/
public function getTimestampHex(): string
{
if ($this->getVersion() !== 1) {