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

SwapSolverServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
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