function LazyUuidFromString::getBytes
@psalm-suppress MoreSpecificReturnType @psalm-suppress LessSpecificReturnStatement we know that { we know that {
Overrides UuidInterface::getBytes
See also
self::$uuid} is a non-empty string, so
hex2bin} will retrieve a non-empty string too.
File
-
vendor/
ramsey/ uuid/ src/ Lazy/ LazyUuidFromString.php, line 268
Class
- LazyUuidFromString
- Lazy version of a UUID: its format has not been determined yet, so it is mostly only usable for string/bytes conversion. This object optimizes instantiation, serialization and string conversion time, at the cost of increased overhead for more advanced…
Namespace
Ramsey\Uuid\LazyCode
public function getBytes() : string {
/** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */
return (string) hex2bin(str_replace('-', '', $this->uuid));
}