Completed
Pull Request — develop (#16)
by
unknown
06:55
created

SwapSolverServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 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
     * @return void
15
     */
16
    public function register()
17
    {
18
        $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

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