Tag::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Entity;
4
5
use Beelab\TagBundle\Tag\TagInterface;
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * @ORM\Table()
10
 * @ORM\Entity()
11
 */
12
class Tag implements TagInterface
13
{
14
    /**
15
     * @var int
16
     *
17
     * @ORM\Column(type="integer")
18
     * @ORM\Id
19
     * @ORM\GeneratedValue(strategy="AUTO")
20
     */
21
    protected $id;
22
23
    /**
24
     * @var string|null
25
     *
26
     * @ORM\Column()
27
     */
28
    protected $name;
29
30
    public function __toString(): string
31
    {
32
        return $this->name ?? '';
33
    }
34
35
    public function getId(): int
36
    {
37
        return $this->id;
38
    }
39
40
    public function setName(?string $name): void
41
    {
42
        $this->name = $name;
43
    }
44
45
    public function getName(): ?string
46
    {
47
        return $this->name;
48
    }
49
}
50
51