| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 17 |
| CRAP Score | 1.0011 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 2 | public function register() |
|
| 29 | { |
||
| 30 | 2 | $this->mergeConfigFrom( |
|
| 31 | 2 | __DIR__ . '/../config/netsparker.php', |
|
| 32 | 2 | 'netsparker' |
|
| 33 | ); |
||
| 34 | $this->app->bind(NetsparkerCloudInterface::class, function ($app) { |
||
| 35 | 2 | $api = $app->make(Client::class); |
|
| 36 | 2 | return $api; |
|
| 37 | 2 | }); |
|
| 38 | $this->app->bind(Client::class, function ($app) { |
||
|
|
|||
| 39 | |||
| 40 | 2 | $httpClient = \Http\Discovery\HttpClientDiscovery::find(); |
|
| 41 | 2 | $plugins = []; |
|
| 42 | 2 | $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri(config('netsparker.url')); |
|
| 43 | 2 | $plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri); |
|
| 44 | 2 | $auth = new \Http\Message\Authentication\BasicAuth( |
|
| 45 | 2 | config('netsparker.username'), |
|
| 46 | 2 | config('netsparker.password') |
|
| 47 | ); |
||
| 48 | 2 | $plugins[] = new \Http\Client\Common\Plugin\AuthenticationPlugin($auth); |
|
| 49 | 2 | $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins); |
|
| 50 | 2 | return Client::create($httpClient); |
|
| 51 | 2 | }); |
|
| 54 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.