Completed
Push — master ( 535176...8d0ac1 )
by Lukáš
09:34
created

UuidAutogeneratedTrait::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
namespace Fousky\Traits\Uuid;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Ramsey\Uuid\Uuid;
7
8
/**
9
 * @author Lukáš Brzák <[email protected]>
10
 */
11
trait UuidAutogeneratedTrait
12
{
13
    /**
14
     * @var Uuid|null
15
     *
16
     * @ORM\Id()
17
     * @ORM\GeneratedValue(strategy="CUSTOM")
18
     * @ORM\CustomIdGenerator(class="Ramsey\Uuid\Doctrine\UuidGenerator")
19
     * @ORM\Column(name="id", type="uuid")
20
     */
21
    protected $id;
22
23
    public function getId(): ?Uuid
24
    {
25
        return $this->id;
26
    }
27
}
28