Passed
Push — master ( 66fe7d...dfeb05 )
by Julito
20:19 queued 13s
created

ExtraFieldSavedSearch::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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 Chamilo\CoreBundle\Traits\UserTrait;
10
use Doctrine\ORM\Mapping as ORM;
11
use Gedmo\Timestampable\Traits\TimestampableEntity;
12
13
/**
14
 * @ORM\Entity
15
 * @ORM\Table(name="extra_field_saved_search")
16
 */
17
class ExtraFieldSavedSearch
18
{
19
    use TimestampableEntity;
20
    use UserTrait;
21
22
    /**
23
     * @ORM\Column(name="id", type="integer", nullable=false)
24
     * @ORM\Id
25
     * @ORM\GeneratedValue
26
     */
27
    protected int $id;
28
29
    /**
30
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\ExtraField")
31
     * @ORM\JoinColumn(name="field_id", referencedColumnName="id")
32
     */
33
    protected ExtraField $field;
34
35
    /**
36
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User")
37
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
38
     */
39
    protected User $user;
40
41
    /**
42
     * @ORM\Column(name="value", type="array", nullable=true, unique=false)
43
     */
44
    protected ?array $value;
45
46
    public function __construct()
47
    {
48
        $this->value = [];
49
    }
50
51
    public function getId()
52
    {
53
        return $this->id;
54
    }
55
56
    public function getField(): ExtraField
57
    {
58
        return $this->field;
59
    }
60
61
    public function setField(ExtraField $field): self
62
    {
63
        $this->field = $field;
64
65
        return $this;
66
    }
67
68
    public function getValue(): ?array
69
    {
70
        return $this->value;
71
    }
72
73
    public function setValue(array $value): self
74
    {
75
        $this->value = $value;
76
77
        return $this;
78
    }
79
}
80