Commit 4c52a6e3 authored by jhodgdon's avatar jhodgdon

Issue #2046951 by drunken monkey, Damien Tournoud: Correct error in UUID docs

parent 3a0e78e8
......@@ -13,6 +13,9 @@
* @see http://php.net/com_create_guid
*/
class Com implements UuidInterface {
/**
* {@inheritdoc}
*/
public function generate() {
// Remove {} wrapper and make lower case to keep result consistent.
return strtolower(trim(com_create_guid(), '{}'));
......
......@@ -13,7 +13,7 @@
class Pecl implements UuidInterface {
/**
* Implements Drupal\Component\Uuid\UuidInterface::generate().
* {@inheritdoc}
*/
public function generate() {
return uuid_create(UUID_TYPE_DEFAULT);
......
......@@ -19,7 +19,7 @@
class Php implements UuidInterface {
/**
* Implements Drupal\Component\Uuid\UuidInterface::generate().
* {@inheritdoc}
*/
public function generate() {
$hex = substr(hash('sha256', Crypt::randomBytes(16)), 0, 32);
......
......@@ -16,7 +16,7 @@ interface UuidInterface {
* Generates a Universally Unique IDentifier (UUID).
*
* @return
* A 32 byte integer represented as a hex string formatted with 4 hypens.
* A 16 byte integer represented as a hex string formatted with 4 hyphens.
*/
public function generate();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment