Passed
Push — master ( 702f24...55adc1 )
by Yannick
09:28
created

SettingsValueTemplate   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 35
dl 0
loc 89
rs 10
c 1
b 0
f 0
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A setCreatedAt() 0 5 1
A getName() 0 3 1
A setDescription() 0 5 1
A getCreatedAt() 0 3 1
A setJsonExample() 0 5 1
A getUpdatedAt() 0 3 1
A getJsonExample() 0 3 1
A getId() 0 3 1
A setName() 0 5 1
A getDescription() 0 3 1
A setUpdatedAt() 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 Symfony\Component\Validator\Constraints as Assert;
11
12
#[ORM\Entity]
13
#[ORM\Table(name: 'settings_value_template', options: ['row_format' => 'DYNAMIC'])]
14
#[ORM\UniqueConstraint(name: 'UNIQ_settings_value_template_name', columns: ['name'])]
15
class SettingsValueTemplate
16
{
17
    #[ORM\Id]
18
    #[ORM\GeneratedValue]
19
    #[ORM\Column(type: 'integer', options: ['unsigned' => true])]
20
    protected ?int $id = null;
21
22
    #[Assert\NotBlank]
23
    #[ORM\Column(type: 'string', length: 190, unique: true)]
24
    protected string $name;
25
26
    #[ORM\Column(type: 'text', nullable: true)]
27
    protected ?string $description = null;
28
29
    #[ORM\Column(type: 'text', nullable: true)]
30
    protected ?string $jsonExample = null;
31
32
    #[ORM\Column(type: 'datetime', nullable: true)]
33
    protected ?\DateTimeInterface $createdAt = null;
34
35
    #[ORM\Column(type: 'datetime', nullable: true)]
36
    protected ?\DateTimeInterface $updatedAt = null;
37
38
    public function getId(): ?int
39
    {
40
        return $this->id;
41
    }
42
43
    public function getName(): string
44
    {
45
        return $this->name;
46
    }
47
48
    public function setName(string $name): self
49
    {
50
        $this->name = $name;
51
52
        return $this;
53
    }
54
55
    public function getDescription(): ?string
56
    {
57
        return $this->description;
58
    }
59
60
    public function setDescription(?string $description): self
61
    {
62
        $this->description = $description;
63
64
        return $this;
65
    }
66
67
    public function getJsonExample(): ?string
68
    {
69
        return $this->jsonExample;
70
    }
71
72
    public function setJsonExample(?string $jsonExample): self
73
    {
74
        $this->jsonExample = $jsonExample;
75
76
        return $this;
77
    }
78
79
    public function getCreatedAt(): ?\DateTimeInterface
80
    {
81
        return $this->createdAt;
82
    }
83
84
    public function setCreatedAt(?\DateTimeInterface $createdAt): self
85
    {
86
        $this->createdAt = $createdAt;
87
88
        return $this;
89
    }
90
91
    public function getUpdatedAt(): ?\DateTimeInterface
92
    {
93
        return $this->updatedAt;
94
    }
95
96
    public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
97
    {
98
        $this->updatedAt = $updatedAt;
99
100
        return $this;
101
    }
102
}
103