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