Uuid::createUuid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types = 1);
3
/**
4
 * /src/Entity/Traits/Uuid.php
5
 *
6
 * @author TLe, Tarmo Leppänen <[email protected]>
7
 */
8
9
namespace App\Entity\Traits;
10
11
use App\Rest\UuidHelper;
12
use Ramsey\Uuid\UuidInterface;
13
14
/**
15
 * Trait Uuid
16
 *
17
 * @package App\Entity\Traits
18
 * @author TLe, Tarmo Leppänen <[email protected]>
19
 */
20
trait Uuid
21
{
22 8
    public function getUuid(): UuidInterface
23
    {
24 8
        return $this->id;
25
    }
26
27 966
    protected function createUuid(): UuidInterface
28
    {
29 966
        return UuidHelper::getFactory()->uuid1();
30
    }
31
}
32