| Conditions | 3 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 14 | public function register() |
||
| 15 | { |
||
| 16 | $this->app->singleton(Client::class, function ($app) { |
||
| 17 | if (empty($app['config']['services.smsbroadcast.username']) |
||
| 18 | || empty($app['config']['services.smsbroadcast.password'])) { |
||
| 19 | throw new \InvalidArgumentException('Missing SMS broadcast config in services'); |
||
| 20 | } |
||
| 21 | |||
| 22 | return ClientFactory::create( |
||
| 23 | $app['config']['services.smsbroadcast.username'], |
||
| 24 | $app['config']['services.smsbroadcast.password'], |
||
| 25 | $app['config']['services.smsbroadcast.default_sender'] |
||
| 26 | ); |
||
| 30 |