aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php')
-rw-r--r--vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php b/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php
index fc2ef7e4d..df750f6a5 100644
--- a/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php
@@ -1,4 +1,5 @@
<?php
+
/**
* This file is part of the ramsey/uuid library
*
@@ -7,28 +8,22 @@
*
* @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\Generator;
+use const UUID_TYPE_RANDOM;
+
/**
- * PeclUuidRandomGenerator provides functionality to generate strings of random
- * binary data using the PECL UUID PHP extension
+ * PeclUuidRandomGenerator generates strings of random binary data using ext-uuid
*
- * @link https://pecl.php.net/package/uuid
+ * @link https://pecl.php.net/package/uuid ext-uuid
*/
class PeclUuidRandomGenerator implements RandomGeneratorInterface
{
- /**
- * Generates a string of random binary data of the specified length
- *
- * @param integer $length The number of bytes of random binary data to generate
- * @return string A binary string
- */
- public function generate($length)
+ public function generate(int $length): string
{
$uuid = uuid_create(UUID_TYPE_RANDOM);