diff options
author | Mario <mario@mariovavti.com> | 2022-10-11 18:18:57 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-11 18:18:57 +0000 |
commit | 5e5f0aa955d86743a14531bed98501b59140ab1f (patch) | |
tree | f8a7bbff876adf28d03cc005b8e0a0602886ffc8 /vendor/ramsey/uuid/src/Type/Hexadecimal.php | |
parent | f9a4c53e3feb07e5319b110b25b4746ae839c420 (diff) | |
download | volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.gz volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.bz2 volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.zip |
update composer libs
Diffstat (limited to 'vendor/ramsey/uuid/src/Type/Hexadecimal.php')
-rw-r--r-- | vendor/ramsey/uuid/src/Type/Hexadecimal.php | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/vendor/ramsey/uuid/src/Type/Hexadecimal.php b/vendor/ramsey/uuid/src/Type/Hexadecimal.php index 88adc2e7e..3c8f30adf 100644 --- a/vendor/ramsey/uuid/src/Type/Hexadecimal.php +++ b/vendor/ramsey/uuid/src/Type/Hexadecimal.php @@ -19,7 +19,7 @@ use ValueError; use function ctype_xdigit; use function sprintf; -use function strpos; +use function str_starts_with; use function strtolower; use function substr; @@ -34,10 +34,7 @@ use function substr; */ final class Hexadecimal implements TypeInterface { - /** - * @var string - */ - private $value; + private string $value; /** * @param string $value The hexadecimal value to store @@ -46,7 +43,7 @@ final class Hexadecimal implements TypeInterface { $value = strtolower($value); - if (strpos($value, '0x') === 0) { + if (str_starts_with($value, '0x')) { $value = substr($value, 2); } @@ -90,18 +87,17 @@ final class Hexadecimal implements TypeInterface /** * Constructs the object from a serialized string representation * - * @param string $serialized The serialized string representation of the object + * @param string $data The serialized string representation of the object * - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @psalm-suppress UnusedMethodCall */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - $this->__construct($serialized); + $this->__construct($data); } /** - * @param array{string: string} $data + * @param array{string?: string} $data */ public function __unserialize(array $data): void { |