Completed
Push — master ( 107a7d...7905cb )
by Davis
01:23
created

Author::getBirthdate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: davis
5
 * Date: 7/23/17
6
 * Time: 3:05 AM
7
 */
8
9
namespace DavisPeixoto\BlogCore\Entity;
10
11
12
use DateTime;
13
use Ramsey\Uuid\UuidInterface;
14
use stdClass;
15
16
/**
17
 * Class Author
18
 * @package DavisPeixoto\Entity
19
 */
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)
114
    {
115
        $this->email = $email;
116
    }
117
118
    /**
119
     * @codeCoverageIgnore
120
     * @return string
121
     */
122
    public function getBio(): string
123
    {
124
        return $this->bio;
125
    }
126
127
    /**
128
     * @codeCoverageIgnore
129
     * @param string $bio
130
     */
131
    public function setBio(string $bio)
132
    {
133
        $this->bio = $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)
150
    {
151
        $this->birthdate = $birthdate;
152
    }
153
}
154