Passed
Pull Request — develop (#16)
by
unknown
07:04 queued 03:46
created

SwapSolverServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
1
<?php
2
3
namespace App\Providers;
4
5
use GuzzleHttp\Client;
6
use Illuminate\Support\ServiceProvider;
7
use App\Judite\Services\SwapSolverService;
8
9
class SwapSolverServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register the application services.
13
     */
14
    public function register()
15
    {
16
        $this->app->singleton(SwapSolverService::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

16
        $this->app->singleton(SwapSolverService::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...
17
            $uri = $this->app['config']->get('services.swapsolver.endpoint');
18
            $client = new Client(['base_uri' => $uri]);
19
20
            return new SwapSolverService($client);
21
        });
22
    }
23
}
24