diff options
author | Mario <mario@mariovavti.com> | 2021-01-13 09:50:53 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-01-13 09:50:53 +0000 |
commit | 5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a (patch) | |
tree | 7521f4800e393538d19c393c6f495ea2d41cbf5a /vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php | |
parent | 0bc4c7d1a0e4348018e533be600ad1c648fd97fb (diff) | |
parent | 4d2bcbc5837a7d99dc541595ca8087c335242af0 (diff) | |
download | volse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.tar.gz volse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.tar.bz2 volse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.zip |
Merge branch '5.2RC'5.2
Diffstat (limited to 'vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php')
-rw-r--r-- | vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php b/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php index b978e2e7b..b33ec31f9 100644 --- a/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php +++ b/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php @@ -1,4 +1,5 @@ <?php + /** * This file is part of the ramsey/uuid library * @@ -7,42 +8,50 @@ * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT - * @link https://benramsey.com/projects/ramsey-uuid/ Documentation - * @link https://packagist.org/packages/ramsey/uuid Packagist - * @link https://github.com/ramsey/uuid GitHub */ -namespace Ramsey\Uuid\Converter; +declare(strict_types=1); -use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; +namespace Ramsey\Uuid\Converter; /** - * NumberConverterInterface converts UUIDs from hexadecimal characters into + * A number converter converts UUIDs from hexadecimal characters into * representations of integers and vice versa + * + * @psalm-immutable */ interface NumberConverterInterface { /** - * Converts a hexadecimal number into an integer representation of the number + * Converts a hexadecimal number into an string integer representation of + * the number * - * The integer representation returned may be an object or a string - * representation of the integer, depending on the implementation. + * The integer representation returned is a string representation of the + * integer, to accommodate unsigned integers greater than PHP_INT_MAX. * * @param string $hex The hexadecimal string representation to convert - * @return mixed - * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * + * @return string String representation of an integer + * + * @psalm-return numeric-string + * + * @psalm-pure */ - public function fromHex($hex); + public function fromHex(string $hex): string; /** - * Converts an integer representation into a hexadecimal string representation - * of the number + * Converts a string integer representation into a hexadecimal string + * representation of the number + * + * @param string $number A string integer representation to convert; this + * must be a numeric string to accommodate unsigned integers greater + * than PHP_INT_MAX. * - * @param mixed $integer An integer representation to convert; this may be - * a true integer, a string integer, or a object representation that - * this converter can understand * @return string Hexadecimal string - * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * + * @psalm-return non-empty-string + * + * @psalm-pure */ - public function toHex($integer); + public function toHex(string $number): string; } |