Completed
Pull Request — master (#304)
by Piotr
07:03
created

TagElement   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 74
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace FSi\FixturesBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\Validator\Constraints as Assert;
7
8
/**
9
 * @ORM\Entity
10
 * @ORM\Table(name="tag_element")
11
 */
12
class TagElement
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
25
     *
26
     * @Assert\NotBlank
27
     * @ORM\Column(type="string", length=255)
28
     */
29
    protected $name;
30
31
    /**
32
     * @var News
33
     *
34
     * @ORM\ManyToOne(targetEntity="Tag", inversedBy="elements")
35
     */
36
    protected $tag;
37
38
    /**
39
     * @return int
40
     */
41
    public function getId()
42
    {
43
        return $this->id;
44
    }
45
46
    /**
47
     * @param int $id
48
     */
49
    public function setId($id)
50
    {
51
        $this->id = $id;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getName()
58
    {
59
        return $this->name;
60
    }
61
62
    /**
63
     * @param string $name
64
     */
65
    public function setName($name)
66
    {
67
        $this->name = $name;
68
    }
69
70
    /**
71
     * @return News
72
     */
73
    public function getTag()
74
    {
75
        return $this->tag;
76
    }
77
78
    /**
79
     * @param News $tag
80
     */
81
    public function setTag($tag = null)
82
    {
83
        $this->tag = $tag;
84
    }
85
}
86