Every8dServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 4
dl 0
loc 11
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 1
1
<?php
2
3
namespace Recca0120\Every8d;
4
5
use Illuminate\Support\Arr;
6
use Illuminate\Support\ServiceProvider;
7
8
class Every8dServiceProvider extends ServiceProvider
9
{
10
    public function register()
11
    {
12
        $this->app->singleton(Client::class, function ($app) {
13
            $config = Arr::get($app['config'], 'services.every8d', []);
14
15
            return new Client(Arr::get($config, 'user_id'), Arr::get($config, 'password'));
16
        });
17
    }
18
}
19