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

AbstractUuidIdentityGenerator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUuidString() 0 3 1
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