Passed
Push — master ( 70e393...45daf5 )
by Julito
09:50
created

CourseTrait::setCourse()   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
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Traits;
5
6
use Chamilo\CoreBundle\Entity\Course;
7
8
/**
9
 * Trait CourseTrait
10
 */
11
trait CourseTrait
12
{
13
    /**
14
     * @return Course
15
     */
16
    public function getCourse()
17
    {
18
        return $this->course;
19
    }
20
21
    /**
22
     * @param Course $course
23
     *
24
     * @return $this
25
     */
26
    public function setCourse(Course $course): self
27
    {
28
        $this->course = $course;
0 ignored issues
show
Bug Best Practice introduced by
The property course does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
29
30
        return $this;
31
    }
32
}
33
34