| 1 | <?php |
||
| 11 | abstract class AbstractRecipient implements HeaderInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var AddressList |
||
| 15 | */ |
||
| 16 | private $recipients; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param AddressList $recipients |
||
| 20 | */ |
||
| 21 | 31 | final public function __construct(AddressList $recipients) |
|
| 22 | { |
||
| 23 | 31 | $this->recipients = $recipients; |
|
| 24 | 31 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @return HeaderName |
||
| 28 | */ |
||
| 29 | abstract public function getName(): HeaderName; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return HeaderValue |
||
| 33 | */ |
||
| 34 | 28 | final public function getValue(): HeaderValue |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $emailAddress |
||
| 41 | * @param string $name |
||
| 42 | * @return AbstractRecipient |
||
| 43 | */ |
||
| 44 | 1 | final public static function fromSingleRecipient(string $emailAddress, string $name = ''): AbstractRecipient |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @param array<mixed> $array pairs of email address and name |
||
| 58 | * @return AbstractRecipient |
||
| 59 | */ |
||
| 60 | 2 | final public static function fromArray(array $array): AbstractRecipient |
|
| 81 | } |
||
| 82 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.