Checks if used functions are declared or listed as dependencies.
1 | <?php |
||
2 | |||
3 | namespace ElfSundae\BearyChat\Laravel; |
||
4 | |||
5 | use Illuminate\Support\ServiceProvider as LaravelServiceProvider; |
||
6 | |||
7 | class ServiceProvider extends LaravelServiceProvider |
||
8 | { |
||
9 | /** |
||
10 | * Register the service provider. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function register() |
||
15 | { |
||
16 | if (is_a($this->app, 'Laravel\Lumen\Application')) { |
||
17 | $this->app->configure('bearychat'); |
||
18 | } |
||
19 | |||
20 | $this->mergeConfigFrom($from = __DIR__.'/../config/bearychat.php', 'bearychat'); |
||
21 | |||
22 | if ($this->app->runningInConsole()) { |
||
23 | $this->publishes([$from => base_path('config/bearychat.php')], 'bearychat'); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
24 | } |
||
25 | |||
26 | $this->app->singleton('bearychat', function ($app) { |
||
27 | return (new ClientManager) |
||
28 | ->setDefaultName($app['config']->get('bearychat.default')) |
||
29 | ->setClientsDefaults($app['config']->get('bearychat.clients_defaults')) |
||
30 | ->setClientsConfig($app['config']->get('bearychat.clients')); |
||
31 | }); |
||
32 | |||
33 | $this->app->alias('bearychat', ClientManager::class); |
||
34 | } |
||
35 | } |
||
36 |