JusibeServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 43
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 8 1
A register() 0 8 1
A provides() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Laravel Jusibe package.
5
 *
6
 * (c) Prosper Otemuyiwa <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Unicodeveloper\JusibePack;
13
14
use Illuminate\Support\ServiceProvider;
15
use Unicodeveloper\Jusibe\Jusibe;
16
17
class JusibeServiceProvider extends ServiceProvider
18
{
19
20
    /*
21
    * Indicates if loading of the provider is deferred.
22
    *
23
    * @var bool
24
    */
25
    protected $defer = false;
26
27
    /**
28
    * Publishes all the config file this package needs to function
29
    */
30
    public function boot()
31
    {
32
        $config = realpath(__DIR__.'/../resources/config/jusibe.php');
33
34
        $this->publishes([
35
            $config => config_path('jusibe.php')
36
        ]);
37
    }
38
39
    /**
40
    * Register the application services.
41
    */
42
    public function register()
43
    {
44
        $this->app->bind('laravel-jusibe', function () {
45
46
            return new Jusibe(config('jusibe.publicKey'), config('jusibe.accessToken'));
47
48
        });
49
    }
50
51
    /**
52
    * Get the services provided by the provider
53
    * @return array
54
    */
55
    public function provides()
56
    {
57
        return ['laravel-jusibe'];
58
    }
59
}