ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 0
f 0
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A boot() 0 6 2
1
<?php
2
3
namespace ThinkOne\LaravelSproutsocialsApi;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7
    /**
8
     * Bootstrap the application services.
9
     * @codeCoverageIgnore
10
     */
11
    public function boot()
12
    {
13
        if ($this->app->runningInConsole()) {
14
            $this->publishes([
15
                __DIR__ . '/../config/sproutsocials-api.php' => config_path('sproutsocials-api.php'),
16
            ], 'config');
17
        }
18
    }
19
20
    /**
21
     * Register the application services.
22
     * @codeCoverageIgnore
23
     */
24
    public function register()
25
    {
26
        $this->mergeConfigFrom(__DIR__ . '/../config/sproutsocials-api.php', 'sproutsocials-api');
27
28
        $this->app->bind('sproutsocials-api', function () {
29
            return new SproutsocialsApi(config('sproutsocials-api.http'));
30
        });
31
    }
32
}
33