Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public static function create(array $options, $type) |
||
19 | 2 | { |
|
20 | 1 | switch ($type) { |
|
21 | 2 | case TransportType::SEND_MAIL: |
|
22 | 1 | return new SendMailTransportFactory($options); |
|
23 | 2 | case TransportType::MAIL: |
|
24 | 1 | return new MailTransportFactory($options); |
|
25 | 1 | case TransportType::SMTP: |
|
26 | 1 | return new SmtpTransportFactory($options); |
|
27 | 1 | default: |
|
28 | throw new InvalidTransportTypeArgumentException("Unknown TransportType: '{$type}'"); |
||
29 | } |
||
32 |