for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Montross50\NetsparkerCloud;
use Illuminate\Support\ServiceProvider;
use Montross50\NetsparkerCloud\SDK\Client;
use Montross50\NetsparkerCloud\SDK\Model\BasicAuthenticationSettingModel;
class NetsparkerCloudServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
$this->publishes([
__DIR__ . '/../config/netsparker.php' => config_path('netsparker.php'),
]);
}
* Register any package services.
public function register()
$this->mergeConfigFrom(
__DIR__ . '/../config/netsparker.php',
'netsparker'
);
$this->app->bind(NetsparkerCloudInterface::class, function ($app) {
$api = $app->make(Client::class);
return $api;
});
$this->app->bind(Client::class, function ($app) {
$app
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
$this->app->bind(Client::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.
$httpClient = \Http\Discovery\HttpClientDiscovery::find();
$plugins = [];
$uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri(config('netsparker.url'));
$plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri);
$auth = new \Http\Message\Authentication\BasicAuth(
config('netsparker.username'),
config('netsparker.password')
$plugins[] = new \Http\Client\Common\Plugin\AuthenticationPlugin($auth);
$httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
return Client::create($httpClient);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.