| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -declare(strict_types=1); | |
| 3 | +declare(strict_types = 1); | |
| 4 | 4 | |
| 5 | 5 | namespace UMA\Uuid; | 
| 6 | 6 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -declare(strict_types=1); | |
| 3 | +declare(strict_types = 1); | |
| 4 | 4 | |
| 5 | 5 | namespace UMA\Uuid; | 
| 6 | 6 | |
| @@ -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 | |
| @@ -38,7 +38,7 @@ discard block | ||
| 38 | 38 | } | 
| 39 | 39 | |
| 40 | 40 | // Use the 16 most significant octets of the hash as the basis for the new Uuid. | 
| 41 | -        $bytes = \unpack('C16', \sha1($this->nsBytes . $name, true)); | |
| 41 | +        $bytes = \unpack('C16', \sha1($this->nsBytes.$name, true)); | |
| 42 | 42 | |
| 43 | 43 | // Set the four most significant bits (bits 12 through 15) of the | 
| 44 | 44 | // time_hi_and_version field to the appropriate 4-bit version number | 
| @@ -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 | |
| @@ -45,7 +45,7 @@ discard block | ||
| 45 | 45 | public function __construct(string $nodeID) | 
| 46 | 46 |      { | 
| 47 | 47 |          if (0 === \preg_match(self::MAC_ADDR_FORMAT, $nodeID)) { | 
| 48 | -            throw new \InvalidArgumentException('$nodeID is not a valid MAC address. Got: ' . $nodeID); | |
| 48 | +            throw new \InvalidArgumentException('$nodeID is not a valid MAC address. Got: '.$nodeID); | |
| 49 | 49 | } | 
| 50 | 50 | |
| 51 | 51 |          $this->nodeID = \str_replace(':', '', $nodeID); | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | |
| 59 | 59 | $bytes = \pack( | 
| 60 | 60 | 'NnnnH12', | 
| 61 | - $t & 0xffffffff, | |
| 61 | + $t & 0xffffffff, | |
| 62 | 62 | $t >> 32 & 0xffff, | 
| 63 | 63 | $t >> 48 & 0x0fff | 0x1000, | 
| 64 | 64 | $this->clockSeq, | 
| @@ -82,6 +82,6 @@ discard block | ||
| 82 | 82 | */ | 
| 83 | 83 | private function timestamp(): int | 
| 84 | 84 |      { | 
| 85 | - return self::GREGORIAN_OFFSET + (int)(10000000 * \microtime(true)); | |
| 85 | + return self::GREGORIAN_OFFSET + (int) (10000000 * \microtime(true)); | |
| 86 | 86 | } | 
| 87 | 87 | } | 
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -declare(strict_types=1); | |
| 3 | +declare(strict_types = 1); | |
| 4 | 4 | |
| 5 | 5 | use UMA\Uuid\Uuid; | 
| 6 | 6 | use UMA\Uuid\CombGenerator; | 
| @@ -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 | |
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | private function __construct(string $text) | 
| 37 | 37 |      { | 
| 38 | 38 |          if (false === self::isUuid($text)) { | 
| 39 | -            throw new \InvalidArgumentException('$text is not a valid Uuid. Got: ' . $text); | |
| 39 | +            throw new \InvalidArgumentException('$text is not a valid Uuid. Got: '.$text); | |
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | 42 | $this->uuid = \strtolower($text); | 
| @@ -66,7 +66,7 @@ discard block | ||
| 66 | 66 | public static function fromBytes(string $bytes): Uuid | 
| 67 | 67 |      { | 
| 68 | 68 |          if (16 !== \strlen($bytes)) { | 
| 69 | -            throw new \InvalidArgumentException('Length of $bytes for new Uuid is not 16. Got: 0x' . \bin2hex($bytes)); | |
| 69 | +            throw new \InvalidArgumentException('Length of $bytes for new Uuid is not 16. Got: 0x'.\bin2hex($bytes)); | |
| 70 | 70 | } | 
| 71 | 71 | |
| 72 | 72 | return new self(self::bin2str($bytes)); | 
| @@ -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 | |
| @@ -39,15 +39,15 @@ discard block | ||
| 39 | 39 | public function __construct(UuidGenerator $generator, \DateTimeImmutable $epoch, int $span, int $granularity) | 
| 40 | 40 |      { | 
| 41 | 41 |          if (new \DateTimeImmutable('now') < $epoch) { | 
| 42 | -            throw new \InvalidArgumentException('$epoch must be in the past. Got timestamp: ' . $epoch->getTimestamp()); | |
| 42 | +            throw new \InvalidArgumentException('$epoch must be in the past. Got timestamp: '.$epoch->getTimestamp()); | |
| 43 | 43 | } | 
| 44 | 44 | |
| 45 | 45 |          if (!\in_array($span, \range(1, 16), true)) { | 
| 46 | -            throw new \InvalidArgumentException('$span must be in the [1, 16] range. Got: ' . $span); | |
| 46 | +            throw new \InvalidArgumentException('$span must be in the [1, 16] range. Got: '.$span); | |
| 47 | 47 | } | 
| 48 | 48 | |
| 49 | 49 |          if (!\in_array($granularity, \range(0, 6), true)) { | 
| 50 | -            throw new \InvalidArgumentException('$granularity must be in the [0, 6] range. Got: ' . $granularity); | |
| 50 | +            throw new \InvalidArgumentException('$granularity must be in the [0, 6] range. Got: '.$granularity); | |
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | 53 | $this->generator = $generator; | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | $head = $this->procrust($this->timestamp()); | 
| 65 | 65 | $tail = \substr($this->generator->generate()->asBytes(), -16 + ($this->span / 2)); | 
| 66 | 66 | |
| 67 | - return Uuid::fromBytes($head . $tail); | |
| 67 | + return Uuid::fromBytes($head.$tail); | |
| 68 | 68 | } | 
| 69 | 69 | |
| 70 | 70 | /** | 
| @@ -78,7 +78,7 @@ discard block | ||
| 78 | 78 |      { | 
| 79 | 79 | $fullTimestampLength = \strlen($this->timestamp()); | 
| 80 | 80 | $choppedDigits = $fullTimestampLength < $this->span ? 0 : $fullTimestampLength - $this->span; | 
| 81 | -        $maxTimestamp = (int)(\hexdec(\str_pad('', $this->span + $choppedDigits, 'f'))/$this->exponent); | |
| 81 | +        $maxTimestamp = (int) (\hexdec(\str_pad('', $this->span + $choppedDigits, 'f')) / $this->exponent); | |
| 82 | 82 | |
| 83 | 83 |          return new \DateTimeImmutable("@$maxTimestamp UTC"); | 
| 84 | 84 | } | 
| @@ -123,6 +123,6 @@ discard block | ||
| 123 | 123 | */ | 
| 124 | 124 | private function timestamp(): string | 
| 125 | 125 |      { | 
| 126 | - return \dechex((int)(\microtime(true) * $this->exponent) - $this->epoch); | |
| 126 | + return \dechex((int) (\microtime(true) * $this->exponent) - $this->epoch); | |
| 127 | 127 | } | 
| 128 | 128 | } | 
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -declare(strict_types=1); | |
| 3 | +declare(strict_types = 1); | |
| 4 | 4 | |
| 5 | 5 | namespace UMA\Uuid; | 
| 6 | 6 | |