| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Lines | 22 |
| Ratio | 84.62 % |
| Tests | 22 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 1 | public function __invoke(array $options) |
|
| 20 | { |
||
| 21 | 1 | $token = (string) ($options['token'] ?? ''); |
|
| 22 | 1 | $channel = (string) ($options['channel'] ?? ''); |
|
| 23 | 1 | $userName = $options['userName'] ?? null; |
|
| 24 | 1 | $useAttachment = (bool) ($options['useAttachment'] ?? true); |
|
| 25 | 1 | $iconEmoji = $options['iconEmoji'] ?? null; |
|
| 26 | 1 | $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
| 27 | 1 | $bubble = (bool) ($options['bubble'] ?? true); |
|
| 28 | 1 | $useShortAttachment = (bool) ($options['useShortAttachment'] ?? false); |
|
| 29 | 1 | $includeContext = (bool) ($options['includeContextAndExtra'] ?? false); |
|
| 30 | 1 | $excludeFields = (array) ($options['excludeFields'] ?? []); |
|
| 31 | |||
| 32 | 1 | return new SlackHandler( |
|
| 33 | 1 | $token, |
|
| 34 | 1 | $channel, |
|
| 35 | 1 | $userName, |
|
| 36 | 1 | $useAttachment, |
|
| 37 | 1 | $iconEmoji, |
|
| 38 | 1 | $level, |
|
| 39 | 1 | $bubble, |
|
| 40 | 1 | $useShortAttachment, |
|
| 41 | 1 | $includeContext, |
|
| 42 | 1 | $excludeFields |
|
| 43 | ); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |