Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function register() |
||
28 | { |
||
29 | $this->mergeConfigFrom(__DIR__.'/config/adwords-targeting-idea-service.php', 'adwords-targeting-idea-service'); |
||
30 | |||
31 | $adwordsConfig = config('adwords-targeting-idea-service'); |
||
32 | |||
33 | $this->app->bind('command.adwords:token', GenerateRefreshTokenCommand::class); |
||
34 | $this->commands([ |
||
35 | 'command.adwords:token', |
||
36 | ]); |
||
37 | |||
38 | |||
39 | $this->app->bind(AdWordsService::class, function () use ($adwordsConfig) { |
||
40 | return AdWordsServiceFactory::createForConfig($adwordsConfig); |
||
41 | }); |
||
42 | |||
43 | $this->app->bind(AdWords::class, function () use ($adwordsConfig) { |
||
44 | $this->guardAgainstInvalidConfiguration($adwordsConfig); |
||
45 | |||
46 | $adWordsService = app(AdWordsService::class); |
||
47 | |||
48 | return new AdWords($adWordsService); |
||
49 | }); |
||
50 | |||
51 | $this->app->alias(AdWords::class, 'laravel-adwords-targeting-idea-service'); |
||
52 | } |
||
53 | |||
61 |