It seems like $this->resolveTransportOptions($options) targeting WebinoMailLib\Factory::resolveTransportOptions() can also be of type object<Traversable>; however, Zend\Mail\Transport\Factory::create() does only seem to accept array, maybe add an additional type check?
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.
Loading history...
23
24
$mailer = new Mailer;
25
26
$mailer->setTransport($transport);
27
28
// TODO config message
29
30
return $mailer;
31
}
32
33
/**
34
* @param array|\Traversable $options
35
* @return array|\Traversable
36
*/
37
private function resolveTransportOptions($options = null)
38
{
39
// TODO optional
40
$defaultTransport = FileMailer::class;
41
42
// TODO constants
43
if (null !== $options && isset($options['transports'])) {
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.