From f4bb7bcbff3770387c2fecfa91ce4a60b916a474 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 27 Nov 2020 08:04:00 +0000 Subject: update composer libs --- vendor/ramsey/uuid/src/Codec/CodecInterface.php | 57 +++++++++++++++---------- 1 file changed, 34 insertions(+), 23 deletions(-) (limited to 'vendor/ramsey/uuid/src/Codec/CodecInterface.php') diff --git a/vendor/ramsey/uuid/src/Codec/CodecInterface.php b/vendor/ramsey/uuid/src/Codec/CodecInterface.php index c6c54c78a..85f8a7e99 100644 --- a/vendor/ramsey/uuid/src/Codec/CodecInterface.php +++ b/vendor/ramsey/uuid/src/Codec/CodecInterface.php @@ -1,4 +1,5 @@ * @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 */ +declare(strict_types=1); + namespace Ramsey\Uuid\Codec; -use InvalidArgumentException; -use Ramsey\Uuid\Exception\InvalidUuidStringException; use Ramsey\Uuid\UuidInterface; /** - * CodecInterface represents a UUID coder-decoder + * A codec encodes and decodes a UUID according to defined rules + * + * @psalm-immutable */ interface CodecInterface { /** - * Encodes a UuidInterface as a string representation of a UUID + * Returns a hexadecimal string representation of a UuidInterface + * + * @param UuidInterface $uuid The UUID for which to create a hexadecimal + * string representation * - * @param UuidInterface $uuid * @return string Hexadecimal string representation of a UUID + * + * @psalm-return non-empty-string */ - public function encode(UuidInterface $uuid); + public function encode(UuidInterface $uuid): string; /** - * Encodes a UuidInterface as a binary representation of a UUID + * Returns a binary string representation of a UuidInterface + * + * @param UuidInterface $uuid The UUID for which to create a binary string + * representation * - * @param UuidInterface $uuid * @return string Binary string representation of a UUID + * + * @psalm-return non-empty-string */ - public function encodeBinary(UuidInterface $uuid); + public function encodeBinary(UuidInterface $uuid): string; /** - * Decodes a string representation of a UUID into a UuidInterface object instance + * Returns a UuidInterface derived from a hexadecimal string representation * - * @param string $encodedUuid - * @return UuidInterface - * @throws InvalidUuidStringException + * @param string $encodedUuid The hexadecimal string representation to + * convert into a UuidInterface instance + * + * @return UuidInterface An instance of a UUID decoded from a hexadecimal + * string representation */ - public function decode($encodedUuid); + public function decode(string $encodedUuid): UuidInterface; /** - * Decodes a binary representation of a UUID into a UuidInterface object instance + * Returns a UuidInterface derived from a binary string representation + * + * @param string $bytes The binary string representation to convert into a + * UuidInterface instance * - * @param string $bytes - * @return UuidInterface - * @throws InvalidUuidStringException - * @throws InvalidArgumentException if string has not 16 characters + * @return UuidInterface An instance of a UUID decoded from a binary string + * representation */ - public function decodeBytes($bytes); + public function decodeBytes(string $bytes): UuidInterface; } -- cgit v1.2.3