aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src/Type/Hexadecimal.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ramsey/uuid/src/Type/Hexadecimal.php')
-rw-r--r--vendor/ramsey/uuid/src/Type/Hexadecimal.php18
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
{