1 | <?php |
||
14 | class MailjetSendApiTransport implements \Swift_Transport |
||
15 | { |
||
16 | protected $client; |
||
17 | protected $dispatcher; |
||
18 | protected $started = true; |
||
19 | protected $templateIdGuesserManager; |
||
20 | |||
21 | /** |
||
22 | * @param Client $client |
||
23 | * @param \Swift_Events_EventDispatcher $dispatcher |
||
24 | * @param TemplateIdGuesserManager $templateIdGuesserManager |
||
25 | */ |
||
26 | 8 | public function __construct( |
|
35 | |||
36 | /** |
||
37 | * Test if this Transport mechanism has started. |
||
38 | * |
||
39 | * @return bool |
||
40 | */ |
||
41 | 1 | public function isStarted() |
|
45 | |||
46 | /** |
||
47 | * Start this Transport mechanism. |
||
48 | */ |
||
49 | 1 | public function start() |
|
53 | |||
54 | /** |
||
55 | * Stop this Transport mechanism. |
||
56 | */ |
||
57 | 1 | public function stop() |
|
61 | |||
62 | /** |
||
63 | * Send the given Message. |
||
64 | * |
||
65 | * Recipient/sender data will be retrieved from the Message API. |
||
66 | * The return value is the number of recipients who were accepted for delivery. |
||
67 | * |
||
68 | * @param Swift_Mime_SimpleMessage $message |
||
69 | * @param string[] $failedRecipients An array of failures by-reference |
||
70 | * |
||
71 | * @return int |
||
72 | */ |
||
73 | 4 | public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) |
|
134 | |||
135 | /** |
||
136 | * Register a plugin in the Transport. |
||
137 | * |
||
138 | * @param Swift_Events_EventListener $plugin |
||
139 | */ |
||
140 | 1 | public function registerPlugin(Swift_Events_EventListener $plugin) |
|
144 | |||
145 | /** |
||
146 | * @return bool |
||
147 | */ |
||
148 | public function ping() |
||
152 | } |
||
153 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: