Skip to content

Commit 4d5846f

Browse files
CS fix
1 parent a41886c commit 4d5846f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Uuid.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final class Uuid
3535
// https://tools.ietf.org/html/rfc4122#section-4.1.4
3636
// 0x01b21dd213814000 is the number of 100-ns intervals between the
3737
// UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00.
38-
public const TIME_OFFSET_INT = 0x01b21dd213814000;
38+
public const TIME_OFFSET_INT = 0x01B21DD213814000;
3939
public const TIME_OFFSET_BIN = "\x01\xb2\x1d\xd2\x13\x81\x40\x00";
4040
public const TIME_OFFSET_COM = "\xfe\x4d\xe2\x2d\xec\x7e\xc0\x00";
4141

@@ -97,7 +97,7 @@ public static function uuid_generate_md5($uuid_ns, $name)
9797
// 16 bits:
9898
// * 8 bits for "clk_seq_hi_res",
9999
// * 8 bits for "clk_seq_low",
100-
hexdec(substr($hash, 16, 4)) & 0x3fff | 0x8000,
100+
hexdec(substr($hash, 16, 4)) & 0x3FFF | 0x8000,
101101
// 48 bits for "node"
102102
substr($hash, 20, 12)
103103
);
@@ -140,7 +140,7 @@ public static function uuid_generate_sha1($uuid_ns, $name)
140140
// * 8 bits for "clk_seq_low",
141141
// WARNING: On old libuuid version, there is a bug. 0x0fff is used instead of 0x3fff
142142
// See https://github.com/karelzak/util-linux/commit/d6ddf07d31dfdc894eb8e7e6842aa856342c526e
143-
hexdec(substr($hash, 16, 4)) & 0x3fff | 0x8000,
143+
hexdec(substr($hash, 16, 4)) & 0x3FFF | 0x8000,
144144
// 48 bits for "node"
145145
substr($hash, 20, 12)
146146
);
@@ -369,7 +369,7 @@ private static function uuid_generate_random()
369369
// * 8 bits for "clk_seq_hi_res",
370370
// * 8 bits for "clk_seq_low",
371371
// two most significant bits holds zero and one for variant DCE1.1
372-
hexdec(substr($uuid, 16, 4)) & 0x3fff | 0x8000,
372+
hexdec(substr($uuid, 16, 4)) & 0x3FFF | 0x8000,
373373
// 48 bits for "node"
374374
substr($uuid, 20, 12)
375375
);
@@ -394,23 +394,23 @@ private static function uuid_generate_time()
394394
// https://tools.ietf.org/html/rfc4122#section-4.1.5
395395
// We are using a random data for the sake of simplicity: since we are
396396
// not able to get a super precise timeOfDay as a unique sequence
397-
$clockSeq = random_int(0, 0x3fff);
397+
$clockSeq = random_int(0, 0x3FFF);
398398

399399
static $node;
400400
if (null === $node) {
401401
if (\function_exists('apcu_fetch')) {
402402
$node = apcu_fetch('__symfony_uuid_node');
403403
if (false === $node) {
404404
$node = sprintf('%06x%06x',
405-
random_int(0, 0xffffff) | 0x010000,
406-
random_int(0, 0xffffff)
405+
random_int(0, 0xFFFFFF) | 0x010000,
406+
random_int(0, 0xFFFFFF)
407407
);
408408
apcu_store('__symfony_uuid_node', $node);
409409
}
410410
} else {
411411
$node = sprintf('%06x%06x',
412-
random_int(0, 0xffffff) | 0x010000,
413-
random_int(0, 0xffffff)
412+
random_int(0, 0xFFFFFF) | 0x010000,
413+
random_int(0, 0xFFFFFF)
414414
);
415415
}
416416
}
@@ -458,7 +458,7 @@ private static function parse($uuid)
458458

459459
private static function toString($v)
460460
{
461-
if (\is_string($v) || null === $v || (\is_object($v) ? method_exists($v, '__toString') : is_scalar($v))) {
461+
if (\is_string($v) || null === $v || (\is_object($v) ? method_exists($v, '__toString') : \is_scalar($v))) {
462462
return (string) $v;
463463
}
464464

0 commit comments

Comments
 (0)