Completed
Push — feature/VSVGVQ-7-Entities ( cc0453 )
by Luc
02:51
created

Entity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace VSV\GVQ_API\Question\Repositories\Entities;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\MappedSuperclass()
9
 */
10
abstract class Entity
11
{
12
    /**
13
     * @var string
14
     *
15
     * @ORM\Id()
16
     * @ORM\Column(type="string", length=36)
17
     */
18
    private $id;
19
20
    /**
21
     * @param string $id
22
     */
23
    public function __construct(string $id)
24
    {
25
        $this->id = $id;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getId(): string
32
    {
33
        return $this->id;
34
    }
35
36
    /**
37
     * @param string $id
38
     */
39
    public function setId(string $id): void
40
    {
41
        $this->id = $id;
42
    }
43
}
44