Passed
Push — master ( 4c9e55...edca11 )
by Evert
03:38
created

VeloServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A register() 0 6 1
1
<?php
2
3
namespace Earnould\LaravelVeloApi;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class VeloServiceProvider extends ServiceProvider 
8
{
9
    public function boot()
10
    {
11
        $this->publishes([
12
            __DIR__.'/../config/laravel-velo-api.php' => config_path('laravel-velo-api.php'),
13
        ], 'config');
14
    }
15
16
     /**
17
     * Register the service provider.
18
     */
19
    public function register()
20
    {
21
        $this->mergeConfigFrom(__DIR__.'/../config/laravel-velo-api.php', 'laravel-velo-api');
22
23
        $this->app->bind('velo-api', function () {
24
            return new Velo(new VeloClient());
25
        });
26
    }
27
}