From 544ef3bc588d4180d7ecad15bdacd43813a7c5c5 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 12 Dec 2019 14:51:10 +0000 Subject: update composer libs and minor notifications display fixes --- .../uuid/src/Generator/DefaultTimeGenerator.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php') diff --git a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php index c9969b3af..5c5ccb294 100644 --- a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php @@ -14,8 +14,11 @@ namespace Ramsey\Uuid\Generator; +use Exception; +use InvalidArgumentException; use Ramsey\Uuid\BinaryUtils; use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; use Ramsey\Uuid\Provider\NodeProviderInterface; use Ramsey\Uuid\Provider\TimeProviderInterface; @@ -72,10 +75,10 @@ class DefaultTimeGenerator implements TimeGeneratorInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return string A binary string - * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * @throws UnsatisfiedDependencyException if called on a 32-bit system and * `Moontoast\Math\BigNumber` is not present - * @throws \InvalidArgumentException - * @throws \Exception if it was not possible to gather sufficient entropy + * @throws InvalidArgumentException + * @throws Exception if it was not possible to gather sufficient entropy */ public function generate($node = null, $clockSeq = null) { @@ -96,14 +99,14 @@ class DefaultTimeGenerator implements TimeGeneratorInterface $hex = vsprintf( '%08s%04s%04s%02s%02s%012s', - array( + [ $uuidTime['low'], $uuidTime['mid'], sprintf('%04x', $timeHi), sprintf('%02x', $clockSeqHi), sprintf('%02x', $clockSeq & 0xff), $node, - ) + ] ); return hex2bin($hex); @@ -115,8 +118,8 @@ class DefaultTimeGenerator implements TimeGeneratorInterface * * @param string|int $node A node value that may be used to override the node provider * @return string Hexadecimal representation of the node ID - * @throws \InvalidArgumentException - * @throws \Exception + * @throws InvalidArgumentException + * @throws Exception */ protected function getValidNode($node) { @@ -130,7 +133,7 @@ class DefaultTimeGenerator implements TimeGeneratorInterface } if (!ctype_xdigit($node) || strlen($node) > 12) { - throw new \InvalidArgumentException('Invalid node value'); + throw new InvalidArgumentException('Invalid node value'); } return strtolower(sprintf('%012s', $node)); -- cgit v1.2.3