Skip to content

Commit f377f6c

Browse files
committed
Set groups byte size in a constant
1 parent 89d2373 commit f377f6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Group.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
final class Group
66
{
7+
private const BYTES = 16;
8+
79
/** @var string */
810
private $id;
911

@@ -14,7 +16,7 @@ private function __construct(string $id)
1416

1517
public static function create(): self
1618
{
17-
return new self(bin2hex(random_bytes(16)));
19+
return new self(bin2hex(random_bytes(self::BYTES)));
1820
}
1921

2022
public function __toString(): string

0 commit comments

Comments
 (0)