SendChampServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 41
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A provides() 0 3 1
A boot() 0 6 1
A register() 0 5 1
1
<?php
2
3
/*
4
 *
5
 * (c) Muhideen Mujeeb Adeoye <[email protected]>
6
 *
7
 */
8
9
namespace Mujhtech\SendChamp;
10
11
use Illuminate\Support\ServiceProvider;
12
13
class SendChampServiceProvider extends ServiceProvider
14
{
15
    /*
16
    * Indicates if loading of the provider is deferred.
17
    *
18
    * @var bool
19
    */
20
21
    /**
22
     * Register services.
23
     *
24
     * @return void
25
     */
26
    public function register()
27
    {
28
        //
29
        $this->app->bind('laravel-sendchamp', function () {
30
            return new SendChamp;
31
        });
32
    }
33
34
    /**
35
     * Publishes all the config file this package needs to function
36
     */
37
    public function boot()
38
    {
39
        $config = realpath(__DIR__.'/../config/sendchamp.php');
40
41
        $this->publishes([
42
            $config => config_path('sendchamp.php'),
0 ignored issues
show
Bug introduced by
The function config_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

42
            $config => /** @scrutinizer ignore-call */ config_path('sendchamp.php'),
Loading history...
43
        ]);
44
    }
45
46
    /**
47
     * Get the services provided by the provider
48
     *
49
     * @return array
50
     */
51
    public function provides()
52
    {
53
        return ['laravel-sendchamp'];
54
    }
55
}
56