for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NeptuneSoftware\Invoice\Providers;
use Illuminate\Support\ServiceProvider;
use NeptuneSoftware\Invoice\Services\BillService;
use NeptuneSoftware\Invoice\Interfaces\BillServiceInterface;
use NeptuneSoftware\Invoice\Interfaces\InvoiceServiceInterface;
use NeptuneSoftware\Invoice\Services\InvoiceService;
class InvoiceServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
$sourceViewsPath = __DIR__ . '/../../resources/views';
$this->loadViewsFrom($sourceViewsPath, 'invoice');
$this->publishes([
$sourceViewsPath => resource_path('views/vendor/invoice'),
], 'views');
// Publish a config file
__DIR__ . '/../../config/invoice.php' => config_path('invoice.php'),
], 'config');
// Publish migrations
__DIR__ . '/../../database/migrations/2017_06_17_163005_create_invoices_tables.php'
=> database_path('migrations/2017_06_17_163005_create_invoices_tables.php'),
], 'migrations');
$this->app->bind(InvoiceServiceInterface::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(InvoiceServiceInterface::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.
return new InvoiceService();
});
$this->app->bind(BillServiceInterface::class, function ($app) {
$this->app->bind(BillServiceInterface::class, function (/** @scrutinizer ignore-unused */ $app) {
return new BillService();
}
* Register any package services.
public function register()
$this->mergeConfigFrom(__DIR__ . '/../../config/invoice.php', 'invoice');
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.