Completed
Push — master ( 32c2ac...90b7d3 )
by olivier
12s
created

Tag::setAdventures()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Badger\Bundle\GameBundle\Entity;
4
5
use Badger\Component\Game\Model\AdventureInterface;
6
use Badger\Component\Game\Model\BadgeInterface;
7
use Badger\Component\Game\Model\QuestInterface;
8
use Badger\Component\Game\Model\TagInterface;
9
10
/**
11
 * Tag entity.
12
 *
13
 * @license http://opensource.org/licenses/MIT The MIT License (MIT)
14
 */
15
class Tag implements TagInterface
16
{
17
    /** @var int */
18
    protected $id;
19
20
    /** @var string */
21
    protected $name;
22
23
    /** @var string */
24
    protected $code;
25
26
    /** @var bool */
27
    protected $isDefault;
28
29
    /** @var \DateTime */
30
    protected $createdAt;
31
32
    /** @var BadgeInterface[] */
33
    protected $badges;
34
35
    /** @var QuestInterface[] */
36
    protected $quests;
37
38
    /** @var AdventureInterface[] */
39
    protected $adventures;
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function getId()
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * {@inheritdoc}
51
     */
52
    public function setName($name)
53
    {
54
        $this->name = $name;
55
56
        return $this;
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function getName()
63
    {
64
        return $this->name;
65
    }
66
67
    /**
68
     * {@inheritdoc}
69
     */
70
    public function setCode($code)
71
    {
72
        $this->code = $code;
73
74
        return $this;
75
    }
76
77
    /**
78
     * {@inheritdoc}
79
     */
80
    public function getCode()
81
    {
82
        return $this->code;
83
    }
84
85
    /**
86
     * {@inheritdoc}
87
     */
88
    public function setIsDefault($isDefault)
89
    {
90
        $this->isDefault = $isDefault;
91
92
        return $this;
93
    }
94
95
    /**
96
     * {@inheritdoc}
97
     */
98
    public function isDefault()
99
    {
100
        return $this->isDefault;
101
    }
102
103
    /**
104
     * {@inheritdoc}
105
     */
106
    public function setCreatedAt(\DateTime $createdAt)
107
    {
108
        $this->createdAt = $createdAt;
109
110
        return $this;
111
    }
112
113
    /**
114
     * {@inheritdoc}
115
     */
116
    public function getCreatedAt()
117
    {
118
        return $this->createdAt;
119
    }
120
121
    /**
122
     * {@inheritdoc}
123
     */
124
    public function getBadges()
125
    {
126
        return $this->badges;
127
    }
128
129
    /**
130
     * {@inheritdoc}
131
     */
132
    public function setBadges(array $badges)
133
    {
134
        $this->badges = $badges;
135
    }
136
137
    /**
138
     * {@inheritdoc}
139
     */
140
    public function getQuests()
141
    {
142
        return $this->quests;
143
    }
144
145
    /**
146
     * {@inheritdoc}
147
     */
148
    public function setQuests(array $quests)
149
    {
150
        $this->quests = $quests;
151
    }
152
153
    /**
154
     * {@inheritdoc}
155
     */
156
    public function getAdventures()
157
    {
158
        return $this->adventures;
159
    }
160
161
    /**
162
     * {@inheritdoc}
163
     */
164
    public function setAdventures($adventures)
165
    {
166
        $this->adventures = $adventures;
167
    }
168
169
    /**
170
     * @return string
171
     */
172
    public function __toString()
173
    {
174
        return $this->name;
175
    }
176
}
177