BpmBaseServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 33
ccs 16
cts 16
cp 1
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 13 1
1
<?php
2
3
namespace agoalofalife\bpm\ServiceProviders;
4
5
6
use agoalofalife\bpm\KernelBpm;
7
use Illuminate\Support\ServiceProvider;
8
9
class BpmBaseServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap any application services.
13
     *
14
     * @return void
15
     */
16 1
    public function boot()
17
    {
18 1
        $this->publishes([
19 1
            __DIR__ . '/../../config/apiBpm.php' => config_path('apiBpm.php')
20 1
        ], 'bpm');
21 1
    }
22
23
    /**
24
     * Register any application services.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30 1
       $this->app->bind('bpm', function(){
31 1
           $bpm = new KernelBpm();
32 1
           $bpm->setConfigManually('apiBpm', [
33 1
               'UrlLogin' => config('apiBpm.UrlLogin'),
34 1
               'Login'    => config('apiBpm.Login'),
35 1
               'Password' => config('apiBpm.Password'),
36 1
               'UrlHome'  => config('apiBpm.UrlHome'),
37 1
           ]);
38 1
           return $bpm;
39 1
       });
40
    }
41
}