Uuid   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

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