Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | 2 | public function boot() |
|
14 | { |
||
15 | 2 | $this->app->when(TotalVoiceChannel::class) |
|
16 | 2 | ->needs(TotalVoice::class) |
|
17 | ->give(function () { |
||
18 | 2 | return new TotalVoice( |
|
19 | 2 | $this->app->make(TotalVoiceService::class), |
|
20 | 2 | $this->app->make(TotalVoiceConfig::class) |
|
21 | 2 | ); |
|
22 | 2 | }); |
|
23 | |||
24 | $this->app->bind(TotalVoiceService::class, function () { |
||
25 | 2 | $config = $this->app['config']['services.totalvoice']; |
|
26 | 2 | $access_token = array_get($config, 'access_token'); |
|
27 | |||
28 | 2 | return new TotalVoiceService($access_token); |
|
29 | 2 | }); |
|
30 | 2 | } |
|
31 | |||
42 |