ApiHelperServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php namespace Arcanedev\LaravelApiHelper;
2
3
use Arcanedev\Support\PackageServiceProvider;
4
5
/**
6
 * Class     ApiHelperServiceProvider
7
 *
8
 * @package  Arcanedev\LaravelApiHelper
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class ApiHelperServiceProvider extends PackageServiceProvider
12
{
13
    /* -----------------------------------------------------------------
14
     |  Properties
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Package name.
20
     *
21
     * @var string
22
     */
23
    protected $package = 'api-helper';
24
25
    /* -----------------------------------------------------------------
26
     |  Main Methods
27
     | -----------------------------------------------------------------
28
     */
29
30
    /**
31
     * Register the service provider.
32
     */
33 84
    public function register()
34
    {
35 84
        parent::register();
36
37 84
        $this->registerConfig();
38
39 84
        $this->singleton(Contracts\Http\JsonResponse::class, Http\JsonResponder::class);
40 84
    }
41
42
    /**
43
     * Boot the service provider.
44
     */
45 84
    public function boot()
46
    {
47 84
        parent::boot();
48
49 84
        $this->registerProvider(Providers\RouteServiceProvider::class);
50
51 84
        $this->publishConfig();
52 84
    }
53
54
    /**
55
     * Get the services provided by the provider.
56
     *
57
     * @return array
58
     */
59 4
    public function provides()
60
    {
61
        return [
62 4
            Contracts\Http\JsonResponse::class,
63
        ];
64
    }
65
}
66