diff options
Diffstat (limited to 'vendor/ramsey/uuid/src/Type/Hexadecimal.php')
-rw-r--r-- | vendor/ramsey/uuid/src/Type/Hexadecimal.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/vendor/ramsey/uuid/src/Type/Hexadecimal.php b/vendor/ramsey/uuid/src/Type/Hexadecimal.php index 3c8f30adf..88adc2e7e 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 str_starts_with; +use function strpos; use function strtolower; use function substr; @@ -34,7 +34,10 @@ use function substr; */ final class Hexadecimal implements TypeInterface { - private string $value; + /** + * @var string + */ + private $value; /** * @param string $value The hexadecimal value to store @@ -43,7 +46,7 @@ final class Hexadecimal implements TypeInterface { $value = strtolower($value); - if (str_starts_with($value, '0x')) { + if (strpos($value, '0x') === 0) { $value = substr($value, 2); } @@ -87,17 +90,18 @@ final class Hexadecimal implements TypeInterface /** * Constructs the object from a serialized string representation * - * @param string $data The serialized string representation of the object + * @param string $serialized The serialized string representation of the object * + * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @psalm-suppress UnusedMethodCall */ - public function unserialize(string $data): void + public function unserialize($serialized): void { - $this->__construct($data); + $this->__construct($serialized); } /** - * @param array{string?: string} $data + * @param array{string: string} $data */ public function __unserialize(array $data): void { |