Completed
Pull Request — 3.1 (#348)
by Piotr
01:23
created

TagElement   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 51
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A getName() 0 4 1
A setName() 0 4 1
A getTag() 0 4 1
A setTag() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FSi\FixturesBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
/**
11
 * @ORM\Entity
12
 * @ORM\Table(name="tag_element")
13
 */
14
class TagElement
15
{
16
    /**
17
     * @var int
18
     *
19
     * @ORM\Column(type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="AUTO")
22
     */
23
    protected $id;
24
25
    /**
26
     * @var string
27
     *
28
     * @Assert\NotBlank
29
     * @ORM\Column(type="string", length=255)
30
     */
31
    protected $name;
32
33
    /**
34
     * @var Tag
35
     *
36
     * @ORM\ManyToOne(targetEntity="Tag", inversedBy="elements")
37
     */
38
    protected $tag;
39
40
    public function getId(): ?int
41
    {
42
        return $this->id;
43
    }
44
45
    public function getName(): ?string
46
    {
47
        return $this->name;
48
    }
49
50
    public function setName(?string $name)
51
    {
52
        $this->name = $name;
53
    }
54
55
    public function getTag(): ?Tag
56
    {
57
        return $this->tag;
58
    }
59
60
    public function setTag(?Tag $tag): void
61
    {
62
        $this->tag = $tag;
63
    }
64
}
65