PagarmeServiceProvider::handleConfigs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: felipe
5
 * Date: 13/01/16
6
 * Time: 18:21
7
 */
8
9
namespace Filpgame\Pagarme;
10
11
12
use Illuminate\Support\ServiceProvider;
13
14
class PagarmeServiceProvider extends ServiceProvider
15
{
16
17
    /**
18
     * Indicates if loading of the provider is deferred.
19
     *
20
     * @var bool
21
     */
22
    protected $defer = true;
23
24
    /**
25
     * Bootstrap the application events.
26
     */
27
    public function boot()
28
    {
29
        $this->handleConfigs();
30
    }
31
32
    /**
33
     * Register the service provider.
34
     */
35
    public function register()
36
    {
37
        $this->app->singleton('pagarme', Pagarme::class);
38
    }
39
40
    /**
41
     * Get the services provided by the provider.
42
     *
43
     * @return array
44
     */
45
    public function provides()
46
    {
47
        return ['pagarme'];
48
    }
49
50
    /**
51
     * Publishes and Merge configs.
52
     */
53
    public function handleConfigs()
54
    {
55
        $this->publishes([__DIR__ . '/../config/pagarme.php' => config_path('pagarme.php')], 'config');
56
    }
57
}