From 4fad8145d66b30d52d03adad3d8ff8ebaebad73c Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 21 Nov 2021 15:15:54 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Identifier/UuidV4Generator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Identifier/UuidV4Generator.php b/src/Identifier/UuidV4Generator.php index 36ccefb..0cad21d 100644 --- a/src/Identifier/UuidV4Generator.php +++ b/src/Identifier/UuidV4Generator.php @@ -31,12 +31,12 @@ public static function generate() { $hash = bin2hex(random_bytes(16)); - $timeHi = hexdec(substr($hash, 12, 4)) & 0x0fff; - $timeHi &= ~(0xf000); + $timeHi = hexdec(substr($hash, 12, 4)) & 0x0FFF; + $timeHi &= ~(0xF000); $timeHi |= 4 << 12; - $clockSeqHi = hexdec(substr($hash, 16, 2)) & 0x3f; - $clockSeqHi &= ~(0xc0); + $clockSeqHi = hexdec(substr($hash, 16, 2)) & 0x3F; + $clockSeqHi &= ~(0xC0); $clockSeqHi |= 0x80; $params = [substr($hash, 0, 8), substr($hash, 8, 4), sprintf('%04x', $timeHi), sprintf('%02x', $clockSeqHi), substr($hash, 18, 2), substr($hash, 20, 12)];