Test Setup Failed
Push — master ( dce13b...3b506f )
by
unknown
21:26
created

UserInfo::setEmail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MovingImage\Client\VMPro\Entity;
6
7
use JMS\Serializer\Annotation\SerializedName;
8
use JMS\Serializer\Annotation\Type;
9
10
class UserInfo
11
{
12
    /**
13
     * @Type("string")
14
     */
15
    private $email;
16
17
    /**
18
     * @Type("string")
19
     * @SerializedName("fullName")
20
     */
21
    private $fullName;
22
23
    /**
24
     * @Type("array")
25
     * @SerializedName("videoManagerIds")
26
     */
27
    private $videoManagerIds = [];
28
29
    public function validate(): void
30
    {
31
        if (!\is_string($this->email) || !\is_string($this->fullName) || !\is_array($this->videoManagerIds)) {
32
            throw new \InvalidArgumentException(sprintf(
33
                '%s is not valid',
34
                self::class
35
            ));
36
        }
37
    }
38
39
    public function getEmail(): string
40
    {
41
        return $this->email;
42
    }
43
44
    public function setEmail(string $email): self
45
    {
46
        $this->email = $email;
47
48
        return $this;
49
    }
50
51
    public function getFullName(): string
52
    {
53
        return $this->fullName;
54
    }
55
56
    public function setFullName(string $fullName): self
57
    {
58
        $this->fullName = $fullName;
59
60
        return $this;
61
    }
62
63
    /**
64
     * @return int[]
65
     */
66
    public function getVideoManagerIds(): array
67
    {
68
        return $this->videoManagerIds;
69
    }
70
71
    /**
72
     * @param int[] $videoManagerIds
73
     */
74
    public function setVideoManagerIds(array $videoManagerIds): self
75
    {
76
        $this->videoManagerIds = $videoManagerIds;
77
78
        return $this;
79
    }
80
}
81