Total Complexity | 11 |
Total Lines | 132 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
20 | class Author extends stdClass |
||
21 | { |
||
22 | /** |
||
23 | * @var UuidInterface |
||
24 | */ |
||
25 | private $authorId; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $name; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $email; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | private $bio; |
||
41 | |||
42 | /** |
||
43 | * @var DateTime |
||
44 | */ |
||
45 | private $birthdate; |
||
46 | |||
47 | /** |
||
48 | * Author constructor. |
||
49 | * @param UuidInterface $authorId |
||
50 | * @param string $name |
||
51 | * @param string $email |
||
52 | * @param string $bio |
||
53 | * @param DateTime $birthdate |
||
54 | */ |
||
55 | public function __construct(UuidInterface $authorId, $name, $email, $bio, DateTime $birthdate = null) |
||
56 | { |
||
57 | $this->authorId = $authorId; |
||
58 | $this->name = $name; |
||
59 | $this->email = $email; |
||
60 | $this->bio = $bio; |
||
61 | $this->birthdate = $birthdate; |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @codeCoverageIgnore |
||
66 | * @return UuidInterface |
||
67 | */ |
||
68 | public function getAuthorId(): UuidInterface |
||
69 | { |
||
70 | return $this->authorId; |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * @codeCoverageIgnore |
||
75 | * @param UuidInterface $authorId |
||
76 | */ |
||
77 | public function setAuthorId(UuidInterface $authorId) |
||
78 | { |
||
79 | $this->authorId = $authorId; |
||
80 | } |
||
81 | |||
82 | /** |
||
83 | * @codeCoverageIgnore |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getName(): string |
||
87 | { |
||
88 | return $this->name; |
||
89 | } |
||
90 | |||
91 | /** |
||
92 | * @codeCoverageIgnore |
||
93 | * @param string $name |
||
94 | */ |
||
95 | public function setName(string $name) |
||
96 | { |
||
97 | $this->name = $name; |
||
98 | } |
||
99 | |||
100 | /** |
||
101 | * @codeCoverageIgnore |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getEmail(): string |
||
105 | { |
||
106 | return $this->email; |
||
107 | } |
||
108 | |||
109 | /** |
||
110 | * @codeCoverageIgnore |
||
111 | * @param string $email |
||
112 | */ |
||
113 | public function setEmail(string $email) |
||
116 | } |
||
117 | |||
118 | /** |
||
119 | * @codeCoverageIgnore |
||
120 | * @return string |
||
121 | */ |
||
122 | public function getBio(): string |
||
125 | } |
||
126 | |||
127 | /** |
||
128 | * @codeCoverageIgnore |
||
129 | * @param string $bio |
||
130 | */ |
||
131 | public function setBio(string $bio) |
||
134 | } |
||
135 | |||
136 | /** |
||
137 | * @codeCoverageIgnore |
||
138 | * @return DateTime |
||
139 | */ |
||
140 | public function getBirthdate(): DateTime |
||
141 | { |
||
142 | return $this->birthdate; |
||
143 | } |
||
144 | |||
145 | /** |
||
146 | * @codeCoverageIgnore |
||
147 | * @param DateTime $birthdate |
||
148 | */ |
||
149 | public function setBirthdate(DateTime $birthdate) |
||
152 | } |
||
153 | } |
||
154 |