CourseItem   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 175
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 11
lcom 0
cbo 0
dl 0
loc 175
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setLocation() 0 6 1
A getLocation() 0 4 1
A setStartDate() 0 6 1
A getStartDate() 0 4 1
A setEndDate() 0 6 1
A getEndDate() 0 4 1
A setGroup() 0 6 1
A getGroup() 0 4 1
A setCourse() 0 6 1
A getCourse() 0 4 1
1
<?php
2
3
namespace KI\PublicationBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use JMS\Serializer\Annotation as JMS;
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
/**
10
 * @ORM\Entity
11
 * @JMS\ExclusionPolicy("all")
12
 */
13
class CourseItem
14
{
15
    /**
16
     * @ORM\Id
17
     * @ORM\Column(name="id", type="integer")
18
     * @ORM\GeneratedValue(strategy="AUTO")
19
     */
20
    protected $id;
21
22
    /**
23
     * Salle de cours/amphi
24
     * @ORM\Column(name="location", type="string")
25
     * @JMS\Expose
26
     * @Assert\Type("string")
27
     * @Assert\NotBlank()
28
     */
29
    protected $location;
30
31
    /**
32
     * Heure de début du cours (timestamp)
33
     * @ORM\Column(name="startDate", type="integer", nullable=true)
34
     * @JMS\Expose
35
     * @Assert\Type("integer")
36
     */
37
    protected $startDate;
38
39
    /**
40
     * Heure de fin du cours (timestamp)
41
     * @ORM\Column(name="endDate", type="integer", nullable=true)
42
     * @JMS\Expose
43
     * @Assert\Type("integer")
44
     */
45
    protected $endDate;
46
47
    /**
48
     * Groupe
49
     * @ORM\Column(name="course_group", type="integer", nullable=false)
50
     * @JMS\Expose
51
     * @Assert\Type("integer")
52
     */
53
    protected $group;
54
55
    /**
56
     * Le cours parent
57
     * @ORM\ManyToOne(targetEntity="KI\PublicationBundle\Entity\Course", inversedBy="courseitems")
58
     * @JMS\Expose
59
     * @Assert\Valid()
60
     */
61
    protected $course;
62
63
    /**
64
     * Get id
65
     *
66
     * @return integer
67
     */
68
    public function getId()
69
    {
70
        return $this->id;
71
    }
72
73
    /**
74
     * Set location
75
     *
76
     * @param string $location
77
     * @return CourseItem
78
     */
79
    public function setLocation($location)
80
    {
81
        $this->location = $location;
82
83
        return $this;
84
    }
85
86
    /**
87
     * Get location
88
     *
89
     * @return string
90
     */
91
    public function getLocation()
92
    {
93
        return $this->location;
94
    }
95
96
    /**
97
     * Set startDate
98
     *
99
     * @param integer $startDate
100
     * @return CourseItem
101
     */
102
    public function setStartDate($startDate)
103
    {
104
        $this->startDate = $startDate;
105
106
        return $this;
107
    }
108
109
    /**
110
     * Get startDate
111
     *
112
     * @return integer
113
     */
114
    public function getStartDate()
115
    {
116
        return $this->startDate;
117
    }
118
119
    /**
120
     * Set endDate
121
     *
122
     * @param integer $endDate
123
     * @return CourseItem
124
     */
125
    public function setEndDate($endDate)
126
    {
127
        $this->endDate = $endDate;
128
129
        return $this;
130
    }
131
132
    /**
133
     * Get endDate
134
     *
135
     * @return integer
136
     */
137
    public function getEndDate()
138
    {
139
        return $this->endDate;
140
    }
141
142
    /**
143
     * Set group
144
     *
145
     * @param string $group
146
     * @return CourseItem
147
     */
148
    public function setGroup($group)
149
    {
150
        $this->group = $group;
151
152
        return $this;
153
    }
154
155
    /**
156
     * Get group
157
     *
158
     * @return string
159
     */
160
    public function getGroup()
161
    {
162
        return $this->group;
163
    }
164
165
    /**
166
     * Set course
167
     *
168
     * @param \KI\PublicationBundle\Entity\Course $course
169
     * @return CourseItem
170
     */
171
    public function setCourse(\KI\PublicationBundle\Entity\Course $course = null)
172
    {
173
        $this->course = $course;
174
175
        return $this;
176
    }
177
178
    /**
179
     * Get course
180
     *
181
     * @return \KI\PublicationBundle\Entity\Course
182
     */
183
    public function getCourse()
184
    {
185
        return $this->course;
186
    }
187
}
188