function TimestampFirstCombCodec::encodeBinary
@psalm-return non-empty-string @psalm-suppress MoreSpecificReturnType we know that the retrieved `string` is never empty @psalm-suppress LessSpecificReturnStatement we know that the retrieved `string` is never empty
Overrides StringCodec::encodeBinary
File
-
vendor/
ramsey/ uuid/ src/ Codec/ TimestampFirstCombCodec.php, line 77
Class
- TimestampFirstCombCodec
- TimestampFirstCombCodec encodes and decodes COMBs, with the timestamp as the first 48 bits
Namespace
Ramsey\Uuid\CodecCode
public function encodeBinary(UuidInterface $uuid) : string {
/** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */
return $this->swapBytes($uuid->getFields()
->getBytes());
}