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 ( 22c686...d73fb8 )
by Alex
01:54
created

Mail::getSubject()   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 string
29
     */
30
    private $subject = '';
31
32
    /**
33
     * @var Content
34
     */
35
    private $content;
36
37
    /**
38
     * @var AddressContainer
39
     */
40
    private $recipients;
41
42
    /**
43
     * @var AddressContainer
44
     */
45
    private $ccs;
46
47
    /**
48
     * @var AddressContainer
49
     */
50
    private $bccs;
51
52
    /**
53
     * @var AttachmentContainer
54
     */
55
    private $attachments;
56
57
    /**
58
     * @var DateTime
59
     */
60
    private $createdAt;
61
62
    public function __construct(Address $sender, DateTime $createdAt = null)
63
    {
64
        $this->sender      = $sender;
65
        $this->content     = new Content();
66
        $this->recipients  = new AddressContainer();
67
        $this->ccs         = new AddressContainer();
68
        $this->bccs        = new AddressContainer();
69
        $this->attachments = new AttachmentContainer();
70
        $this->createdAt   = $createdAt !== null ? $createdAt : new DateTime();
71
    }
72
73
    /**
74
     * @return Content
75
     */
76
    public function content(): Content
77
    {
78
        return $this->content;
79
    }
80
81
    /**
82
     * @return AddressContainer
83
     */
84
    public function recipients(): AddressContainer
85
    {
86
        return $this->recipients;
87
    }
88
89
    /**
90
     * @return Address
91
     */
92
    public function sender(): Address
93
    {
94
        return $this->sender;
95
    }
96
97
    /**
98
     * @return AddressContainer
99
     */
100
    public function ccs(): AddressContainer
101
    {
102
        return $this->ccs;
103
    }
104
105
    /**
106
     * @return AddressContainer
107
     */
108
    public function bccs(): AddressContainer
109
    {
110
        return $this->bccs;
111
    }
112
113
    /**
114
     * @return AttachmentContainer
115
     */
116
    public function attachments(): AttachmentContainer
117
    {
118
        return $this->attachments;
119
    }
120
121
    /**
122
     * @return string
123
     */
124
    public function getId(): string
125
    {
126
        return $this->id;
127
    }
128
129
    /**
130
     * @param string $id
131
     */
132
    public function setId(string $id)
133
    {
134
        $this->id = $id;
135
    }
136
137
    /**
138
     * @return DateTime
139
     */
140
    public function getCreatedAt(): DateTime
141
    {
142
        return $this->createdAt;
143
    }
144
145
    /**
146
     * @return string
147
     */
148
    public function getSubject(): string
149
    {
150
        return $this->subject;
151
    }
152
153
    /**
154
     * @param string $subject
155
     */
156
    public function setSubject(string $subject)
157
    {
158
        $this->subject = $subject;
159
    }
160
161
}