Completed
Push — master ( 02417d...5bd6ed )
by Julián
05:15
created

AbstractUuidIdentityGenerator::getUuidString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * identity (https://github.com/phpgears/identity).
5
 * Identity objects for PHP.
6
 *
7
 * @license MIT
8
 * @link https://github.com/phpgears/identity
9
 * @author Julián Gutiérrez <[email protected]>
10
 */
11
12
declare(strict_types=1);
13
14
namespace Gears\Identity;
15
16
use Ramsey\Uuid\Uuid;
17
18
/**
19
 * Abstract UUID identity generator.
20
 */
21
abstract class AbstractUuidIdentityGenerator implements IdentityGenerator
22
{
23
    /**
24
     * Get UUID string.
25
     *
26
     * @return string
27
     */
28
    protected function getUuidString(): string
29
    {
30
        return Uuid::uuid4()->toString();
31
    }
32
}
33