for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NotificationChannels\Sendberry;
use Illuminate\Support\ServiceProvider;
class SendberryServiceProvider extends ServiceProvider
{
/**
* Register the application services.
*/
public function register()
$this->app->singleton(SendberryApi::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->singleton(SendberryApi::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.
$username = $this->app['config']['services.sendberry.username'];
$password = $this->app['config']['services.sendberry.password'];
$authKey = $this->app['config']['services.sendberry.auth_key'];
$from = $this->app['config']['services.sendberry.from'];
$testMode = $this->app['config']['services.sendberry.test_mode'];
$webhook = $this->app['config']['services.sendberry.webhook'];
$client = new SendberryApi($authKey, $username, $password, $from, $webhook, $testMode);
return $client;
});
}
public function provides(): array
return [
SendberryApi::class,
];
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.