Tag   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 32
ccs 6
cts 8
cp 0.75
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A __toString() 0 3 1
A setName() 0 3 1
A getId() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
9
10
/**
11
 * @ORM\Entity(repositoryClass="App\Repository\TagRepository")
12
 * @ORM\Table(name="rw_tag")
13
 *
14
 * @UniqueEntity("name")
15
 */
16
class Tag
17
{
18
    /**
19
     * @ORM\Id()
20
     * @ORM\GeneratedValue()
21
     * @ORM\Column(type="integer")
22
     */
23
    private ?int $id = null;
24
25
    /**
26
     * @ORM\Column(type="string", length=255, unique=true)
27
     */
28
    private string $name;
29
30 1
    public function __toString(): string
31
    {
32 1
        return $this->name;
33
    }
34
35
    public function getId(): ?int
36
    {
37
        return $this->id;
38
    }
39
40 9
    public function getName(): ?string
41
    {
42 9
        return $this->name;
43
    }
44
45 1
    public function setName(string $name): void
46
    {
47 1
        $this->name = $name;
48
    }
49
}
50