Completed
Push — master ( 6db1e1...6c89f6 )
by BENOIT
04:54
created

GeneratedULIDTrait::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
2
3
namespace BenTools;
4
5
use Doctrine\ORM\Mapping\Column;
6
use Doctrine\ORM\Mapping\CustomIdGenerator;
7
use Doctrine\ORM\Mapping\GeneratedValue;
8
use Doctrine\ORM\Mapping\Id;
9
10
trait GeneratedULIDTrait
11
{
12
    /**
13
     * @var string
14
     *
15
     * @Id()
16
     * @GeneratedValue(strategy="CUSTOM")
17
     * @CustomIdGenerator(class="\BenTools\ULIDGenerator")
18
     * @Column(type="string", length=26)
19
     */
20
    private $id;
21
22
    /**
23
     * @return string
24
     */
25
    public function getId(): ?string
26
    {
27
        return $this->id;
28
    }
29
}
30