@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace UMA\Uuid; |
| 6 | 6 | |
@@ -44,6 +44,6 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function generate(string $name = null): Uuid |
| 46 | 46 | { |
| 47 | - return Uuid::fromBytes($this->head . \pack('J', $this->counter++)); |
|
| 47 | + return Uuid::fromBytes($this->head.\pack('J', $this->counter++)); |
|
| 48 | 48 | } |
| 49 | 49 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace UMA\Uuid; |
| 6 | 6 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public function __construct(string $nodeID) |
| 48 | 48 | { |
| 49 | 49 | if (0 === \preg_match(self::MAC_ADDR_FORMAT, $nodeID)) { |
| 50 | - throw new \InvalidArgumentException('$nodeID is not a valid MAC address. Got: ' . $nodeID); |
|
| 50 | + throw new \InvalidArgumentException('$nodeID is not a valid MAC address. Got: '.$nodeID); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $this->nodeID = \str_replace(':', '', $nodeID); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | $bytes = \pack( |
| 61 | 61 | 'NnnnH12', |
| 62 | - $t & 0xffffffff, |
|
| 62 | + $t & 0xffffffff, |
|
| 63 | 63 | $t >> 32 & 0xffff, |
| 64 | 64 | $t >> 48 & 0x0fff | 0x1000, |
| 65 | 65 | \random_int(0, 0x3fff) | 0x8000, |
@@ -83,6 +83,6 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | private function timestamp(): int |
| 85 | 85 | { |
| 86 | - return self::GREGORIAN_OFFSET + (int)(10000000 * \microtime(true)); |
|
| 86 | + return self::GREGORIAN_OFFSET + (int) (10000000 * \microtime(true)); |
|
| 87 | 87 | } |
| 88 | 88 | } |