function GenericNumberConverter::toHex
@inheritDoc @psalm-pure @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 NumberConverterInterface::toHex
File
-
vendor/
ramsey/ uuid/ src/ Converter/ Number/ GenericNumberConverter.php, line 52
Class
- GenericNumberConverter
- GenericNumberConverter uses the provided calculator to convert decimal numbers to and from hexadecimal values
Namespace
Ramsey\Uuid\Converter\NumberCode
public function toHex(string $number) : string {
/** @phpstan-ignore-next-line PHPStan complains that this is not a non-empty-string. */
return $this->calculator
->toBase(new IntegerObject($number), 16);
}