Upgrade framework

This commit is contained in:
mischa.spelt committed 2023-11-14 16:54:35 +01:00
1 parent 1648a5cd42
commit 4fcf6fffcc
10548 files changed
+693131 -466691

No files matched your search

+34 -18
View File
@@ -1,4 +1,5 @@
<?php
/**
* This file is part of the ramsey/uuid library
*
@@ -7,49 +8,64 @@
*
* @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
*/
declare(strict_types=1);
namespace Ramsey\Uuid\Codec;
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
* @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
* @return UuidInterface
* @param string $bytes The binary string representation to convert into a
* UuidInterface instance
*
* @return UuidInterface An instance of a UUID decoded from a binary string
* representation
*/
public function decodeBytes($bytes);
public function decodeBytes(string $bytes): UuidInterface;
}