Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
14 | public function boot() |
||
15 | { |
||
16 | $this->app->when(MessagebirdChannel::class) |
||
17 | ->needs(MessagebirdClient::class) |
||
18 | ->give(function () { |
||
19 | $config = config('services.messagebird'); |
||
20 | |||
21 | if (is_null($config)) { |
||
22 | throw InvalidConfiguration::configurationNotSet(); |
||
23 | } |
||
24 | |||
25 | return new MessagebirdClient(new Client(), $config['access_key']); |
||
26 | }); |
||
27 | } |
||
28 | } |
||
29 |