Passed
Push — master ( 45d699...d5e463 )
by Julito
12:21
created

CChatConversation   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 51
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getResourceIdentifier() 0 3 1
A getId() 0 3 1
A getResourceName() 0 3 1
A setName() 0 5 1
A __toString() 0 3 1
A getName() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
8
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * CChatConversation.
13
 *
14
 * @ORM\Table(name="c_chat_conversation")
15
 * @ORM\Entity
16
 */
17
class CChatConversation extends AbstractResource implements ResourceInterface
18
{
19
    /**
20
     * @var int
21
     *
22
     * @ORM\Column(name="id", type="integer")
23
     * @ORM\Id
24
     * @ORM\GeneratedValue
25
     */
26
    protected $id;
27
28
    /**
29
     * @var string
30
     *
31
     * @ORM\Column(name="name", type="string", length=255, nullable=true)
32
     */
33
    protected $name;
34
35
    public function __toString(): string
36
    {
37
        return $this->getName();
38
    }
39
40
    public function getId(): int
41
    {
42
        return $this->id;
43
    }
44
45
    public function getName(): string
46
    {
47
        return $this->name;
48
    }
49
50
    public function setName(string $name): self
51
    {
52
        $this->name = $name;
53
54
        return $this;
55
    }
56
57
    /**
58
     * Resource identifier.
59
     */
60
    public function getResourceIdentifier(): int
61
    {
62
        return $this->getId();
63
    }
64
65
    public function getResourceName(): string
66
    {
67
        return $this->getName();
68
    }
69
}
70