Passed
Push — master ( 7a0fed...a72568 )
by Julito
09:50
created

GradebookResultAttempt   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 16
c 0
b 0
f 0
dl 0
loc 66
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getScore() 0 3 1
A setScore() 0 5 1
A getComment() 0 3 1
A getId() 0 3 1
A getResult() 0 3 1
A setResult() 0 5 1
A setComment() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Entity;
8
9
use Doctrine\ORM\Mapping as ORM;
10
use Gedmo\Timestampable\Traits\TimestampableEntity;
11
12
/**
13
 * GradebookResultAttempt.
14
 *
15
 * @ORM\Table(name="gradebook_result_attempt")
16
 * @ORM\Entity
17
 */
18
class GradebookResultAttempt
19
{
20
    use TimestampableEntity;
21
22
    /**
23
     * @ORM\Column(name="id", type="integer")
24
     * @ORM\Id
25
     * @ORM\GeneratedValue
26
     */
27
    protected int $id;
28
29
    /**
30
     * @ORM\Column(name="comment", type="text", nullable=true)
31
     */
32
    protected ?string $comment = null;
33
34
    /**
35
     * @ORM\Column(name="score", type="float", nullable=true)
36
     */
37
    protected ?float $score = null;
38
39
    /**
40
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\GradebookResult")
41
     * @ORM\JoinColumn(name="result_id", referencedColumnName="id", onDelete="CASCADE")
42
     */
43
    protected GradebookResult $result;
44
45
    public function getId(): int
46
    {
47
        return $this->id;
48
    }
49
50
    public function getComment(): ?string
51
    {
52
        return $this->comment;
53
    }
54
55
    public function setComment(?string $comment): self
56
    {
57
        $this->comment = $comment;
58
59
        return $this;
60
    }
61
62
    public function getScore(): ?float
63
    {
64
        return $this->score;
65
    }
66
67
    public function setScore(?float $score): self
68
    {
69
        $this->score = $score;
70
71
        return $this;
72
    }
73
74
    public function getResult(): GradebookResult
75
    {
76
        return $this->result;
77
    }
78
79
    public function setResult(GradebookResult $result): self
80
    {
81
        $this->result = $result;
82
83
        return $this;
84
    }
85
}
86