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.
Completed
Push — master ( f98089...b28a0d )
by Mario
36:02
created

EmailContent::getRecipient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Netgen\InformationCollection\API\Value\DataTransfer;
6
7
use eZ\Publish\Core\FieldType\BinaryFile\Value as BinaryFile;
8
use Netgen\InformationCollection\API\Value\ValueObject;
9
10
class EmailContent extends ValueObject
11
{
12
    /**
13
     * @var array
14
     */
15
    protected $recipients;
16
17
    /**
18
     * @var string
19
     */
20
    protected $subject;
21
22
    /**
23
     * @var array
24
     */
25
    protected $sender;
26
27
    /**
28
     * @var string
29
     */
30
    protected $body;
31
32
    /**
33
     * @var BinaryFile[]
34
     */
35
    protected $attachments = [];
36
37
    /**
38
     * EmailData constructor.
39
     *
40
     * @param array $recipients
41
     * @param array $sender
42
     * @param string $subject
43
     * @param string $body
44
     * @param BinaryFile[] $attachments
45
     */
46
    public function __construct(array $recipients, array $sender, string $subject, string $body, array $attachments = [])
47
    {
48
        $this->recipients = $recipients;
49
        $this->subject = $subject;
50
        $this->sender = $sender;
51
        $this->body = $body;
52
        $this->attachments = $attachments;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function getRecipients(): array
59
    {
60
        return $this->recipients;
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getSubject(): string
67
    {
68
        return $this->subject;
69
    }
70
71
    /**
72
     * @return array
73
     */
74
    public function getSender(): array
75
    {
76
        return $this->sender;
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getBody(): string
83
    {
84
        return $this->body;
85
    }
86
87
    /**
88
     * @return bool
89
     */
90
    public function hasAttachments(): bool
91
    {
92
        return !empty($this->attachments);
93
    }
94
95
    /**
96
     * @return BinaryFile[]
97
     */
98
    public function getAttachments(): array
99
    {
100
        return $this->attachments;
101
    }
102
}
103