None   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 166
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 13
eloc 15
c 1
b 0
f 0
dl 0
loc 166
rs 10

13 Methods

Rating   Name   Duplication   Size   Complexity  
A to() 0 3 1
A cc() 0 3 1
A from() 0 3 1
A sender() 0 3 1
A bcc() 0 3 1
A replyTo() 0 3 1
A send() 0 3 1
A html() 0 3 1
A subject() 0 3 1
A attach() 0 3 1
A embed() 0 3 1
A header() 0 3 1
A text() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2025
6
 * @package Base
7
 * @subpackage Mail
8
 */
9
10
11
namespace Aimeos\Base\Mail\Message;
12
13
14
/**
15
 * Black hole e-mail message implementation.
16
 *
17
 * @package Base
18
 * @subpackage Mail
19
 */
20
class None
21
	implements \Aimeos\Base\Mail\Message\Iface
22
{
23
	/**
24
	 * Adds a source e-mail address of the message.
25
	 *
26
	 * @param string $email Source e-mail address
27
	 * @param string|null $name Name of the user sending the e-mail or null for no name
28
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
29
	 */
30
	public function from( string $email, ?string $name = null ) : Iface
31
	{
32
		return $this;
33
	}
34
35
36
	/**
37
	 * Adds a destination e-mail address of the target user mailbox.
38
	 *
39
	 * @param string $email Destination address of the target mailbox
40
	 * @param string|null $name Name of the user owning the target mailbox or null for no name
41
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
42
	 */
43
	public function to( string $email, ?string $name = null ) : Iface
44
	{
45
		return $this;
46
	}
47
48
49
	/**
50
	 * Adds a destination e-mail address for a copy of the message.
51
	 *
52
	 * @param string $email Destination address for a copy
53
	 * @param string|null $name Name of the user owning the target mailbox or null for no name
54
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
55
	 */
56
	public function cc( string $email, ?string $name = null ) : Iface
57
	{
58
		return $this;
59
	}
60
61
62
	/**
63
	 * Adds a destination e-mail address for a hidden copy of the message.
64
	 *
65
	 * @param array|string $email Destination address for a hidden copy
66
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
67
	 */
68
	public function bcc( $email ) : Iface
69
	{
70
		return $this;
71
	}
72
73
74
	/**
75
	 * Adds the return e-mail address for the message.
76
	 *
77
	 * @param string $email E-mail address which should receive all replies
78
	 * @param string|null $name Name of the user which should receive all replies or null for no name
79
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
80
	 */
81
	public function replyTo( string $email, ?string $name = null ) : Iface
82
	{
83
		return $this;
84
	}
85
86
87
	/**
88
	 * Adds a custom header to the message.
89
	 *
90
	 * @param string $name Name of the custom e-mail header
91
	 * @param string $value Text content of the custom e-mail header
92
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
93
	 */
94
	public function header( string $name, string $value ) : Iface
95
	{
96
		return $this;
97
	}
98
99
100
	/**
101
	 * Sends the e-mail message to the mail server.
102
	 *
103
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
104
	 */
105
	public function send() : Iface
106
	{
107
		return $this;
108
	}
109
110
111
	/**
112
	 * Sets the e-mail address and name of the sender of the message (higher precedence than "From").
113
	 *
114
	 * @param string $email Source e-mail address
115
	 * @param string|null $name Name of the user who sent the message or null for no name
116
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
117
	 */
118
	public function sender( string $email, ?string $name = null ) : Iface
119
	{
120
		return $this;
121
	}
122
123
124
	/**
125
	 * Sets the subject of the message.
126
	 *
127
	 * @param string $subject Subject of the message
128
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
129
	 */
130
	public function subject( string $subject ) : Iface
131
	{
132
		return $this;
133
	}
134
135
136
	/**
137
	 * Sets the text body of the message.
138
	 *
139
	 * @param string $message Text body of the message
140
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
141
	 */
142
	public function text( string $message ) : Iface
143
	{
144
		return $this;
145
	}
146
147
148
	/**
149
	 * Sets the HTML body of the message.
150
	 *
151
	 * @param string $message HTML body of the message
152
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
153
	 */
154
	public function html( string $message ) : Iface
155
	{
156
		return $this;
157
	}
158
159
160
	/**
161
	 * Adds an attachment to the message.
162
	 *
163
	 * @param string|null $data Binary or string @author nose
164
	 * @param string|null $mimetype Mime type of the attachment (e.g. "text/plain", "application/octet-stream", etc.)
165
	 * @param string|null $filename Name of the attached file (or null if inline disposition is used)
166
	 * @param string $disposition Type of the disposition ("attachment" or "inline")
167
	 * @return \Aimeos\Base\Mail\Message\Iface Message object
168
	 */
169
	public function attach( ?string $data, ?string $filename = null, ?string $mimetype = null, string $disposition = 'attachment' ) : Iface
170
	{
171
		return $this;
172
	}
173
174
175
	/**
176
	 * Embeds an attachment into the message and returns its reference.
177
	 *
178
	 * @param string|null $data Binary or string
179
	 * @param string|null $mimetype Mime type of the attachment (e.g. "text/plain", "application/octet-stream", etc.)
180
	 * @param string|null $filename Name of the attached file
181
	 * @return string Content ID for referencing the attachment in the HTML body
182
	 */
183
	public function embed( ?string $data, ?string $filename = null, ?string $mimetype = null ) : string
184
	{
185
		return '';
186
	}
187
}
188