Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
40 | 1 | public static function get(array $setting): MessengerInterface |
|
41 | { |
||
42 | 1 | $serverUrl = $setting['config']['server_url'] ?? ''; |
|
43 | 1 | $userId = $setting['config']['user_id'] ?? ''; |
|
44 | 1 | $accessToken = $setting['config']['access_token'] ?? ''; |
|
45 | 1 | $channel = $setting['config']['channel'] ?? ''; |
|
46 | |||
47 | 1 | return new RocketChat($accessToken, $userId, $serverUrl, $channel); |
|
48 | } |
||
50 |