TwitServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 6
c 1
b 1
f 0
dl 0
loc 21
ccs 0
cts 10
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A register() 0 6 1
1
<?php
2
3
namespace Tequilarapido\Twit;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class TwitServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application events.
11
     */
12
    public function boot()
13
    {
14
        $this->publishes([
15
            __DIR__.'/../config/twit.php' => config_path('twit.php'),
16
        ]);
17
    }
18
19
    /**
20
     * Register the service provider.
21
     */
22
    public function register()
23
    {
24
        $this->mergeConfigFrom(__DIR__.'/../config/twit.php', 'twit');
25
26
        $this->app->singleton(TwitApps::class, function ($app) {
27
            return new TwitApps($app['config']['twit']['apps']);
28
        });
29
    }
30
}
31