GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 086b40...47f694 )
by Alex
01:58
created

Mail::getCreatedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Conversio\Mail;
3
4
use Conversio\Mail\Address\Address;
5
use Conversio\Mail\Address\AddressContainer;
6
use Conversio\Mail\Attachment\AttachmentContainer;
7
use DateTime;
8
9
/**
10
 * Created by PhpStorm.
11
 * User: alex
12
 * Date: 07.12.16
13
 * Time: 22:13
14
 */
15
class Mail
16
{
17
    /**
18
     * @var string $id
19
     */
20
    private $id;
21
22
    /**
23
     * @var Address
24
     */
25
    private $sender;
26
27
    /**
28
     * @var Content
29
     */
30
    private $content;
31
32
    /**
33
     * @var AddressContainer
34
     */
35
    private $recipients;
36
37
    /**
38
     * @var AddressContainer
39
     */
40
    private $ccs;
41
42
    /**
43
     * @var AddressContainer
44
     */
45
    private $bccs;
46
47
    /**
48
     * @var AttachmentContainer
49
     */
50
    private $attachments;
51
52
    /**
53
     * @var DateTime
54
     */
55
    private $createdAt;
56
57
    public function __construct(Address $sender, DateTime $createdAt = null)
58
    {
59
        $this->sender      = $sender;
60
        $this->content     = new Content();
61
        $this->recipients  = new AddressContainer();
62
        $this->ccs         = new AddressContainer();
63
        $this->bccs        = new AddressContainer();
64
        $this->attachments = new AttachmentContainer();
65
        $this->createdAt   = $createdAt !== null ? $createdAt : new DateTime();
66
    }
67
68
    /**
69
     * @return Content
70
     */
71
    public function content(): Content
72
    {
73
        return $this->content;
74
    }
75
76
    /**
77
     * @return AddressContainer
78
     */
79
    public function recipients(): AddressContainer
80
    {
81
        return $this->recipients;
82
    }
83
84
    /**
85
     * @return Address
86
     */
87
    public function sender(): Address
88
    {
89
        return $this->sender;
90
    }
91
92
    /**
93
     * @return AddressContainer
94
     */
95
    public function ccs(): AddressContainer
96
    {
97
        return $this->ccs;
98
    }
99
100
    /**
101
     * @return AddressContainer
102
     */
103
    public function bccs(): AddressContainer
104
    {
105
        return $this->bccs;
106
    }
107
108
    /**
109
     * @return AttachmentContainer
110
     */
111
    public function attachments(): AttachmentContainer
112
    {
113
        return $this->attachments;
114
    }
115
116
    /**
117
     * @return string
118
     */
119
    public function getId(): string
120
    {
121
        return $this->id;
122
    }
123
124
    /**
125
     * @param string $id
126
     */
127
    public function setId(string $id)
128
    {
129
        $this->id = $id;
130
    }
131
132
    /**
133
     * @return DateTime
134
     */
135
    public function getCreatedAt(): DateTime
136
    {
137
        return $this->createdAt;
138
    }
139
140
}