1 | <?php |
||
23 | class Mailer |
||
24 | { |
||
25 | /** |
||
26 | * Senders for email sending |
||
27 | * |
||
28 | * @var SenderInterface[] |
||
29 | */ |
||
30 | private $senders = []; |
||
31 | |||
32 | /** |
||
33 | * @var ContainerInterface |
||
34 | */ |
||
35 | private $container; |
||
36 | |||
37 | /** |
||
38 | * EmailSender constructor. |
||
39 | * |
||
40 | * @param ContainerInterface $container |
||
41 | * @param LoggerInterface $logger |
||
|
|||
42 | */ |
||
43 | public function __construct(ContainerInterface $container) |
||
47 | |||
48 | /** |
||
49 | * Get senders |
||
50 | * |
||
51 | * @return array |
||
52 | */ |
||
53 | public function getSenders(): array |
||
57 | |||
58 | /** |
||
59 | * Set senders |
||
60 | * |
||
61 | * @param array $senders |
||
62 | */ |
||
63 | public function setSenders(array $senders): void |
||
67 | |||
68 | /** |
||
69 | * Send email template |
||
70 | * |
||
71 | * @param TemplateInterface $template |
||
72 | * @param array|string $emails |
||
73 | * @param null|MessageOptionsInterface $options |
||
74 | * |
||
75 | * @return int |
||
76 | */ |
||
77 | public function send(TemplateInterface $template, $emails, ?MessageOptionsInterface $options = null): int |
||
111 | |||
112 | /** |
||
113 | * Make email engine sender |
||
114 | * |
||
115 | * @param string $sender |
||
116 | * @param array $options |
||
117 | * |
||
118 | * @return SenderInterface |
||
119 | */ |
||
120 | protected function makeSender(string $sender, array $options = []): SenderInterface |
||
131 | |||
132 | /** |
||
133 | * Make email engine repository |
||
134 | * |
||
135 | * @param string $repository |
||
136 | * @param TemplateInterface $template |
||
137 | * @param array $arguments |
||
138 | * |
||
139 | * @return RepositoryInterface |
||
140 | */ |
||
141 | protected function makeRepository(string $repository, TemplateInterface $template, array $arguments = []): RepositoryInterface |
||
149 | } |
||
150 |
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.