ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 25
ccs 15
cts 15
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 9 2
A register() 0 10 1
1
<?php
2
3
namespace LaravelSixConnex;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7 21
    public function boot()
8
    {
9 21
        if ($this->app->runningInConsole()) {
10 21
            $this->publishes([
11 21
                __DIR__ . '/../config/sixconnex.php' => config_path('sixconnex.php'),
12 21
            ], 'config');
13
14
15 21
            $this->commands([
16 21
            ]);
17
        }
18
    }
19
20 21
    public function register()
21
    {
22 21
        $this->mergeConfigFrom(__DIR__ . '/../config/sixconnex.php', 'sixconnex');
23
24 21
        $this->app->bind(SixConnexApi::class, function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
        $this->app->bind(SixConnexApi::class, function (/** @scrutinizer ignore-unused */ $app) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25 10
            return new SixConnexApi(
26 10
                config('sixconnex.client_domain'),
27 10
                config('sixconnex.api_username'),
28 10
                config('sixconnex.api_password'),
29 10
                config('sixconnex.options'),
30 10
            );
31 21
        });
32
    }
33
}
34