Completed
Pull Request — master (#15)
by Yann
02:46
created

Delivery   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 120
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 120
ccs 23
cts 23
cp 1
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getMessage() 0 4 1
A getRecipient() 0 4 1
A getOptions() 0 4 1
A getSubject() 0 4 1
A __construct() 0 17 1
A getBody() 0 4 1
A getParameters() 0 4 1
A getAttachments() 0 4 1
1
<?php
2
3
namespace Yokai\MessengerBundle;
4
use Symfony\Component\HttpFoundation\File\File;
5
6
/**
7
 * @author Yann Eugoné <[email protected]>
8
 */
9
class Delivery
10
{
11
    /**
12
     * @var string
13
     */
14
    private $message;
15
16
    /**
17
     * @var mixed
18
     */
19
    private $recipient;
20
21
    /**
22
     * @var array
23
     */
24
    private $options;
25
26
    /**
27
     * @var string
28
     */
29
    private $subject;
30
31
    /**
32
     * @var string
33
     */
34
    private $body;
35
36
    /**
37
     * @var array
38
     */
39
    private $parameters;
40
41
    /**
42
     * @var array
43
     */
44
    private $attachments;
45
46
    /**
47
     * @param string $message
48
     * @param mixed  $recipient
49
     * @param array  $options
50
     * @param string $subject
51
     * @param string $body
52
     * @param array  $parameters
53
     * @param File[] $attachments
54
     */
55 8
    public function __construct(
56
        $message,
57
        $recipient,
58
        array $options,
59
        $subject,
60
        $body,
61
        array $parameters,
62
        array $attachments
63
    ) {
64 8
        $this->message = $message;
65 8
        $this->recipient = $recipient;
66 8
        $this->options = $options;
67 8
        $this->subject = $subject;
68 8
        $this->body = $body;
69 8
        $this->parameters = $parameters;
70 8
        $this->attachments = $attachments;
71 8
    }
72
73
    /**
74
     * @return string
75
     */
76 2
    public function getMessage()
77
    {
78 2
        return $this->message;
79
    }
80
81
    /**
82
     * @return mixed
83
     */
84 2
    public function getRecipient()
85
    {
86 2
        return $this->recipient;
87
    }
88
89
    /**
90
     * @return array
91
     */
92 4
    public function getOptions()
93
    {
94 4
        return $this->options;
95
    }
96
97
    /**
98
     * @return string
99
     */
100 4
    public function getSubject()
101
    {
102 4
        return $this->subject;
103
    }
104
105
    /**
106
     * @return string
107
     */
108 3
    public function getBody()
109
    {
110 3
        return $this->body;
111
    }
112
113
    /**
114
     * @return array
115
     */
116 2
    public function getParameters()
117
    {
118 2
        return $this->parameters;
119
    }
120
121
    /**
122
     * @return File[]
123
     */
124 1
    public function getAttachments()
125
    {
126 1
        return $this->attachments;
127
    }
128
}
129