| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 1 | public function __invoke(array $options) |
|
| 17 | { |
||
| 18 | 1 | $apiUser = (string) ($options['apiUser'] ?? ''); |
|
| 19 | 1 | $apiKey = (string) ($options['apiKey'] ?? ''); |
|
| 20 | 1 | $from = (string) ($options['from'] ?? ''); |
|
| 21 | 1 | $to = ($options['to'] ?? ''); |
|
| 22 | 1 | $subject = (string) ($options['subject'] ?? ''); |
|
| 23 | 1 | $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
| 24 | 1 | $bubble = (bool) ($options['bubble'] ?? true); |
|
| 25 | |||
| 26 | 1 | return new SendGridHandler( |
|
| 27 | 1 | $apiUser, |
|
| 28 | 1 | $apiKey, |
|
| 29 | 1 | $from, |
|
| 30 | 1 | $to, |
|
| 31 | 1 | $subject, |
|
| 32 | 1 | $level, |
|
| 33 | 1 | $bubble |
|
| 34 | ); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |