1
|
|
|
<?php |
2
|
|
|
namespace SamIT\React\Smtp; |
3
|
|
|
|
4
|
|
|
interface RequestInterface extends MessageInterface |
5
|
|
|
{ |
6
|
|
|
/** |
7
|
|
|
* Return an instance with the provided value replacing the original recipient(s). |
8
|
|
|
* |
9
|
|
|
* This method MUST be implemented in such a way as to retain the |
10
|
|
|
* immutability of the message, and MUST return an instance that has the |
11
|
|
|
* new and/or updated header and value. |
12
|
|
|
* |
13
|
|
|
* @return self |
14
|
|
|
* @param string $email |
15
|
|
|
* @param string $name |
16
|
|
|
* @throws \InvalidArgumentException for invalid email. |
17
|
|
|
*/ |
18
|
|
|
public function withRecipient($email, $name = null); |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Return an instance with the provided values replacing the original recipient(s). |
22
|
|
|
* |
23
|
|
|
* This method MUST be implemented in such a way as to retain the |
24
|
|
|
* immutability of the message, and MUST return an instance that has the |
25
|
|
|
* new and/or updated header and value. |
26
|
|
|
* |
27
|
|
|
* @return self |
28
|
|
|
* @param array $recipients Array of email => name pairs. |
29
|
|
|
* @throws \InvalidArgumentException for invalid email. |
30
|
|
|
*/ |
31
|
|
|
public function withRecipients(array $recipients); |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Return an instance with the provided recipients added to the original recipient(s). |
35
|
|
|
* |
36
|
|
|
* This method MUST be implemented in such a way as to retain the |
37
|
|
|
* immutability of the message, and MUST return an instance that has the |
38
|
|
|
* new and/or updated header and value. |
39
|
|
|
* |
40
|
|
|
* @return self |
41
|
|
|
* @param array $recipients Array of email => name pairs. |
|
|
|
|
42
|
|
|
* @throws \InvalidArgumentException for invalid email. |
43
|
|
|
*/ |
44
|
|
|
public function withAddedRecipient($email, $name = null); |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Return an instance with the provided recipients added to the original recipient(s). |
48
|
|
|
* |
49
|
|
|
* This method MUST be implemented in such a way as to retain the |
50
|
|
|
* immutability of the message, and MUST return an instance that has the |
51
|
|
|
* new and/or updated header and value. |
52
|
|
|
* |
53
|
|
|
* @return self |
54
|
|
|
* @param array $recipients Array of email => name pairs. |
55
|
|
|
* @throws \InvalidArgumentException for invalid email. |
56
|
|
|
*/ |
57
|
|
|
public function withAddedRecipients(array $recipients); |
58
|
|
|
|
59
|
|
|
} |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.