for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Providers;
use App\Alma\AlmaUsers;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\ServiceProvider;
use Scriptotek\Alma\Client as AlmaClient;
class AlmaServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;
* Register services.
* @return void
public function register()
$this->app->singleton(AlmaClient::class, function (Application $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(AlmaClient::class, function (/** @scrutinizer ignore-unused */ Application $app) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return new AlmaClient(config('services.alma.key'), 'eu');
});
$this->app->singleton(AlmaUsers::class, function (Application $app) {
return new AlmaUsers($app->make(AlmaClient::class));
}
* Get the services provided by the provider.
* @return array
public function provides()
return [
AlmaClient::class,
AlmaUsers::class,
];
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.