Passed
Push — master ( a5432c...54cbff )
by Marcel
16:00
created

TuitionGradeType::setValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace App\Entity;
4
5
use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
6
use Doctrine\ORM\Mapping as ORM;
7
use Ramsey\Uuid\Uuid;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
#[ORM\Entity]
11
#[Auditable]
12
class TuitionGradeType {
13
14
    use IdTrait;
15
    use UuidTrait;
16
17
    #[ORM\Column(type: 'string')]
18
    #[Assert\NotBlank]
19
    private ?string $displayName = null;
20
21
    #[ORM\Column(name: '`values`', type: 'json')]
22
    #[Assert\Count(min: 1)]
23
    private array $values = [ ];
24
25
    public function __construct() {
26
        $this->uuid = Uuid::uuid4();
27
    }
28
29
    /**
30
     * @return string|null
31
     */
32
    public function getDisplayName(): ?string {
33
        return $this->displayName;
34
    }
35
36
    /**
37
     * @param string|null $displayName
38
     * @return TuitionGradeType
39
     */
40
    public function setDisplayName(?string $displayName): TuitionGradeType {
41
        $this->displayName = $displayName;
42
        return $this;
43
    }
44
45
    /**
46
     * @return string[]
47
     */
48
    public function getValues(): array {
49
        return $this->values;
50
    }
51
52
    /**
53
     * @param string[] $values
54
     * @return TuitionGradeType
55
     */
56
    public function setValues(array $values): TuitionGradeType {
57
        $this->values = $values;
58
        return $this;
59
    }
60
}