LazerpayServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 *
5
 * (c) Muhideen Mujeeb Adeoye <[email protected]>
6
 *
7
 */
8
9
namespace Mujhtech\Lazerpay;
10
11
use Illuminate\Support\ServiceProvider;
12
13
class LazerpayServiceProvider extends ServiceProvider
14
{
15
16
    /*
17
     * Indicates if loading of the provider is deferred.
18
     *
19
     * @var bool
20
     */
21
22
    /**
23
     * Register services.
24
     *
25
     * @return void
26
     */
27
    public function register()
28
    {
29
        //
30
        $this->app->bind('laravel-lazerpay', function () {
31
32
            return new Lazerpay;
33
34
        });
35
    }
36
37
    /**
38
     * Publishes all the config file this package needs to function
39
     */
40
41
    public function boot()
42
    {
43
        $config = realpath(__DIR__ . '/../config/lazerpay.php');
44
45
        $this->publishes([
46
            $config => config_path('lazerpay.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

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