Passed
Push — master ( e0f7b0...a8affd )
by Julito
10:09
created

Profile   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 93
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 93
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A __toString() 0 3 1
A setLevels() 0 5 1
A setSkills() 0 5 1
A getLevels() 0 3 1
A getSkills() 0 3 1
A setName() 0 5 1
A getName() 0 3 1
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
9
/**
10
 * Profile.
11
 *
12
 * @ORM\Table(name="skill_level_profile")
13
 * @ORM\Entity
14
 */
15
class Profile
16
{
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Column(name="id", type="integer")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue
23
     */
24
    protected $id;
25
26
    /**
27
     * @var string
28
     *
29
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
30
     */
31
    protected $name;
32
33
    /**
34
     * @ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\Skill", mappedBy="profile", cascade={"persist"})
35
     */
36
    protected $skills;
37
38
    /**
39
     * @ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\Level", mappedBy="profile", cascade={"persist"})
40
     * @ORM\OrderBy({"position" = "ASC"})
41
     */
42
    protected $levels;
43
44
    /**
45
     * @return string
46
     */
47
    public function __toString()
48
    {
49
        return (string) $this->getName();
50
    }
51
52
    /**
53
     * @return int
54
     */
55
    public function getId()
56
    {
57
        return $this->id;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getName()
64
    {
65
        return $this->name;
66
    }
67
68
    /**
69
     * @param string $name
70
     *
71
     * @return Profile
72
     */
73
    public function setName($name)
74
    {
75
        $this->name = $name;
76
77
        return $this;
78
    }
79
80
    public function getSkills()
81
    {
82
        return $this->skills;
83
    }
84
85
    /**
86
     * @return Profile
87
     */
88
    public function setSkills($skills)
89
    {
90
        $this->skills = $skills;
91
92
        return $this;
93
    }
94
95
    public function getLevels()
96
    {
97
        return $this->levels;
98
    }
99
100
    /**
101
     * @return Profile
102
     */
103
    public function setLevels($levels)
104
    {
105
        $this->levels = $levels;
106
107
        return $this;
108
    }
109
}
110