Passed
Push — master ( 0b0f56...afb2ec )
by Julito
16:30 queued 04:59
created

GradebookComment   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 37
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Chamilo\CoreBundle\Traits\UserTrait;
8
use Doctrine\ORM\Mapping as ORM;
9
use Gedmo\Mapping\Annotation as Gedmo;
10
use Gedmo\Timestampable\Traits\TimestampableEntity;
11
12
/**
13
 * @ORM\Table(
14
 *     name="gradebook_comment",
15
 *     indexes={}
16
 * )
17
 * @ORM\Entity
18
 */
19
class GradebookComment
20
{
21
    use UserTrait;
22
    use TimestampableEntity;
23
24
    /**
25
     * @var int
26
     *
27
     * @ORM\Column(name="id", type="bigint")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue
30
     */
31
    protected $id;
32
33
    /**
34
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="gradeBookComments")
35
     * @ORM\JoinColumn(name="user_id",referencedColumnName="id",onDelete="CASCADE")
36
     */
37
    protected User $user;
38
39
    /**
40
     *
41
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\GradebookCategory", inversedBy="comments")
42
     * @ORM\JoinColumn(name="gradebook_id",referencedColumnName="id",onDelete="CASCADE")
43
     */
44
    protected GradebookCategory $gradeBook;
45
46
    /**
47
     * @var string
48
     *
49
     * @ORM\Column(name="comment", type="text")
50
     */
51
    protected string $comment;
52
53
    public function __construct()
54
    {
55
        $this->comment = '';
56
    }
57
}
58