Completed
Push — master ( 0dfc19...c58ed8 )
by Julito
10:02
created

SkillRelCourse::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Gedmo\Timestampable\Traits\TimestampableEntity;
9
10
/**
11
 * SkillRelCourse.
12
 *
13
 * @ORM\Table(name="skill_rel_course")
14
 * @ORM\Entity
15
 */
16
class SkillRelCourse
17
{
18
    use TimestampableEntity;
19
20
    /**
21
     * @var int
22
     *
23
     * @ORM\Column(name="id", type="integer")
24
     * @ORM\Id
25
     * @ORM\GeneratedValue
26
     */
27
    protected $id;
28
29
    /**
30
     * @var Skill
31
     *
32
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Skill", inversedBy="courses")
33
     * @ORM\JoinColumn(name="skill_id", referencedColumnName="id")
34
     */
35
    protected $skill;
36
37
    /**
38
     * @var Course
39
     *
40
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="skills", cascade={"persist"})
41
     * @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
42
     */
43
    protected $course;
44
45
    /**
46
     * @var Session
47
     *
48
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session", inversedBy="skills", cascade={"persist"})
49
     * @ORM\JoinColumn(name="session_id", referencedColumnName="id", nullable=false)
50
     */
51
    protected $session;
52
53
    /**
54
     * SkillRelItem constructor.
55
     */
56
    public function __construct()
57
    {
58
        $this->createdAt = new \DateTime('now');
0 ignored issues
show
Bug Best Practice introduced by
The property createdAt does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
59
        $this->updatedAt = new \DateTime('now');
0 ignored issues
show
Bug Best Practice introduced by
The property updatedAt does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getId()
66
    {
67
        return $this->id;
68
    }
69
70
    /**
71
     * @param int $id
72
     *
73
     * @return SkillRelCourse
74
     */
75
    public function setId($id)
76
    {
77
        $this->id = $id;
78
79
        return $this;
80
    }
81
82
    /**
83
     * @return Skill
84
     */
85
    public function getSkill()
86
    {
87
        return $this->skill;
88
    }
89
90
    /**
91
     * @param Skill $skill
92
     *
93
     * @return SkillRelCourse
94
     */
95
    public function setSkill($skill)
96
    {
97
        $this->skill = $skill;
98
99
        return $this;
100
    }
101
102
    /**
103
     * @return Course
104
     */
105
    public function getCourse()
106
    {
107
        return $this->course;
108
    }
109
110
    /**
111
     * @param Course $course
112
     *
113
     * @return SkillRelCourse
114
     */
115
    public function setCourse($course)
116
    {
117
        $this->course = $course;
118
119
        return $this;
120
    }
121
122
    /**
123
     * @return Session
124
     */
125
    public function getSession()
126
    {
127
        return $this->session;
128
    }
129
130
    /**
131
     * @param Session $session
132
     *
133
     * @return SkillRelCourse
134
     */
135
    public function setSession($session)
136
    {
137
        $this->session = $session;
138
139
        return $this;
140
    }
141
142
    /**
143
     * @return \DateTime
144
     */
145
    public function getCreatedAt()
146
    {
147
        return $this->createdAt;
148
    }
149
150
    /**
151
     * @param \DateTime $createdAt
152
     *
153
     * @return SkillRelCourse
154
     */
155
    public function setCreatedAt($createdAt)
156
    {
157
        $this->createdAt = $createdAt;
0 ignored issues
show
Bug Best Practice introduced by
The property createdAt does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
158
159
        return $this;
160
    }
161
162
    /**
163
     * @return \DateTime
164
     */
165
    public function getUpdatedAt()
166
    {
167
        return $this->updatedAt;
168
    }
169
170
    /**
171
     * @param \DateTime $updatedAt
172
     *
173
     * @return SkillRelCourse
174
     */
175
    public function setUpdatedAt($updatedAt)
176
    {
177
        $this->updatedAt = $updatedAt;
0 ignored issues
show
Bug Best Practice introduced by
The property updatedAt does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
178
179
        return $this;
180
    }
181
}
182