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

CourseTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCourse() 0 5 1
A getCourse() 0 3 1
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