PayantServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

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 Payant package.
5
 *
6
 * (c) Emmanuel Awotunde <[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 Olaoluwa98\Payant;
13
14
use Illuminate\Support\ServiceProvider;
15
16
class PayantServiceProvider extends ServiceProvider
17
{
18
19
    /*
20
    * Indicates if loading of the provider is deferred.
21
    *
22
    * @var bool
23
    */
24
    protected $defer = false;
25
26
    /**
27
    * Publishes all the config file this package needs to function
28
    */
29
    public function boot()
30
    {
31
        $config = realpath(__DIR__.'/../resources/config/payant.php');
32
33
        $this->publishes([
34
            $config => config_path('payant.php')
35
        ]);
36
    }
37
38
    /**
39
    * Register the application services.
40
    */
41
    public function register()
42
    {
43
        $this->app->bind('laravel-payant', function () {
44
45
            return new Payant;
46
47
        });
48
    }
49
50
    /**
51
    * Get the services provided by the provider
52
    * @return array
53
    */
54
    public function provides()
55
    {
56
        return ['laravel-payant'];
57
    }
58
}
59